View | Details | Raw Unified | Return to bug 19519
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt (+10 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
3
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
3
    [%- IF ( action == "new" ) %]
4
    [%- IF ( action == "new" ) %]
Lines 92-97 Link Here
92
                                        <input type="text" size="50" name="description" />
93
                                        <input type="text" size="50" name="description" />
93
                                    [% END %]
94
                                    [% END %]
94
                                </li>
95
                                </li>
96
                                <li>
97
                                    <label for="branchcode">Library: </label>
98
                                    <select id="branchocode" name="branchcode">
99
                                        <option value="">No library, will select during transfer</option>
100
                                        [% IF ( collection.colBranchcode ) %]
101
                                          [% PROCESS options_for_libraries libraries => Branches.all( selected => collection.colBranchcode, unfiltered => 1, ) %]
102
                                        [% ELSE %]
103
                                          [% PROCESS options_for_libraries libraries => Branches.all( selected => collection.colBranchcode, unfiltered => 1, ) %]
104
                                        [% END %]
95
                            </ol>
105
                            </ol>
96
                        </fieldset>
106
                        </fieldset>
97
                        <fieldset class="action">
107
                        <fieldset class="action">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt (-1 / +1 lines)
Lines 46-52 Link Here
46
                                <tr>
46
                                <tr>
47
                                    <th>Title</th>
47
                                    <th>Title</th>
48
                                    <th>Description</th>
48
                                    <th>Description</th>
49
                                    <th>Current location</th>
49
                                    <th>Library</th>
50
                                    <th>&nbsp;</th>
50
                                    <th>&nbsp;</th>
51
                                </tr>
51
                                </tr>
52
                            </thead>
52
                            </thead>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt (-1 / +5 lines)
Lines 38-44 Link Here
38
                                    <li>
38
                                    <li>
39
                                        <label for="toBranch">Choose your library:</label>
39
                                        <label for="toBranch">Choose your library:</label>
40
                                        <select id="toBranch" name="toBranch">
40
                                        <select id="toBranch" name="toBranch">
41
                                            [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
41
                                            [% IF ( collection.colBranchcode ) %]
42
                                              [% PROCESS options_for_libraries libraries => Branches.all( selected => collection.colBranchcode, unfiltered => 1 ) %]
43
                                            [% ELSE %]
44
                                              [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
45
                                            [% END %]
42
                                        </select>
46
                                        </select>
43
                                    </li>
47
                                    </li>
44
                                </ol>
48
                                </ol>
(-)a/rotating_collections/editCollections.pl (-1 / +4 lines)
Lines 46-56 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
46
if ( $action eq 'create' ) {
46
if ( $action eq 'create' ) {
47
    my $title       = $query->param('title');
47
    my $title       = $query->param('title');
48
    my $description = $query->param('description');
48
    my $description = $query->param('description');
49
    my $branchcode  = $query->param('branchcode') || undef;
49
    $template->param( createdTitle => $title );
50
    $template->param( createdTitle => $title );
50
51
51
    my $collection = Koha::RotatingCollection->new(
52
    my $collection = Koha::RotatingCollection->new(
52
        {   colTitle => $title,
53
        {   colTitle => $title,
53
            colDesc  => $description,
54
            colDesc  => $description,
55
            colBranchcode => $branchcode,
54
        }
56
        }
55
    );
57
    );
56
58
Lines 85-90 if ( $action eq 'create' ) { Link Here
85
    my $colId       = $query->param('colId');
87
    my $colId       = $query->param('colId');
86
    my $title       = $query->param('title');
88
    my $title       = $query->param('title');
87
    my $description = $query->param('description');
89
    my $description = $query->param('description');
90
    my $branchcode  = $query->param('branchcode') || undef;
88
91
89
    $template->param( updatedTitle => $title );
92
    $template->param( updatedTitle => $title );
90
93
Lines 92-97 if ( $action eq 'create' ) { Link Here
92
        my $collection = Koha::RotatingCollections->find($colId);
95
        my $collection = Koha::RotatingCollections->find($colId);
93
        $collection->colTitle($title);
96
        $collection->colTitle($title);
94
        $collection->colDesc($description);
97
        $collection->colDesc($description);
98
        $collection->colBranchcode($branchcode);
95
99
96
        eval { $collection->store; };
100
        eval { $collection->store; };
97
101
98
- 

Return to bug 19519