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

(-)a/C4/RotatingCollections.pm (+1 lines)
Lines 247-252 sub GetItemsInCollection { Link Here
247
    my $sth = $dbh->prepare(
247
    my $sth = $dbh->prepare(
248
        "SELECT
248
        "SELECT
249
                             biblio.title,
249
                             biblio.title,
250
                             biblio.biblionumber,
250
                             items.itemcallnumber,
251
                             items.itemcallnumber,
251
                             items.barcode
252
                             items.barcode
252
                           FROM collections, collections_tracking, items, biblio
253
                           FROM collections, collections_tracking, items, biblio
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+1 lines)
Lines 732-737 fieldset.rows fieldset.action { Link Here
732
	padding : 1em;
732
	padding : 1em;
733
}
733
}
734
734
735
fieldset.brief label.inline,
735
fieldset.rows label.inline {
736
fieldset.rows label.inline {
736
	display : inline;
737
	display : inline;
737
	float : none;
738
	float : none;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc (+17 lines)
Line 0 Link Here
1
            <div id="toolbar" class="btn-toolbar">
2
                <div class="btn-group">
3
                    <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=new"><i class="icon-plus"></i> New collection</a>
4
                </div>
5
6
                [% IF ( colId ) %]
7
                    <div class="btn-group">
8
                        <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/transferCollection.pl?colId=[% colId %]">Transfer</a>
9
                    </div>
10
                    <div class="btn-group">
11
                        <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&amp;colId=[% colId %]"><i class="icon-pencil"></i> Edit</a>
12
                    </div>
13
                    <div class="btn-group">
14
                        <a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&amp;colId=[% colId %]"><i class="icon-remove"></i> Delete</a>
15
                    </div>
16
                [% END %]
17
            </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt (-73 / +74 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Add/Remove items</title>
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Collection [% colTitle %] &rsquo; Add or remove items</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
4
<script type="text/javascript">
5
    //<![CDATA[
5
    //<![CDATA[
Lines 13-121 Link Here
13
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
15
15
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; Add/Remove items</div>
16
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]">Collection <i>[% colTitle %]</i></a> &rsaquo; Add or remove items</div>
17
17
18
<div id="doc3" class="yui-t2">
18
<div id="doc3" class="yui-t2">
19
    <div id="bd">
19
    <div id="bd">
20
        <div class="yui-b">
20
        <div id="yui-main">
21
            [% INCLUDE 'tools-menu.inc' %]
21
            <div class="yui-b">
22
        </div>
23
22
24
        <div class="yui-main">
23
              [% INCLUDE 'rotating-collections-toolbar.inc' %]
25
            <div class="yui-db">
26
24
27
              <h1>Rotating collections: Add/Remove items</h1>
25
              <h1>Collection <i>[% colTitle %]</i></h1>
28
29
              <div>
30
                  <br />
31
                  [% IF ( previousActionAdd ) %]
32
                    [% IF ( addSuccess ) %]
33
                      <div class="alert">Item with barcode '[% barcode %]' added successfully!</div>
34
                    [% ELSE %]
35
                      <div class="alert">
36
                        <p>Failed to add item with barcode <i>[% barcode %]</i>:
37
                        <p>
38
                            [% IF failureMessage == "NO_ITEM" %]
39
                                No item with matching barcode found!
40
                            [% ELSIF failureMessage == "IN_COLLECTION_OTHER" %]
41
                                Item is already in a different rotating collection!
42
                            [% ELSE %]
43
                                [% failureMessage %]
44
                            [% END %]
45
                        </p>
46
                    </div>
47
                    [% END %]
48
                  [% END %]
49
26
50
                  [% IF ( previousActionRemove ) %]
27
              [% IF ( previousActionAdd ) %]
51
                    [% IF ( removeSuccess ) %]
28
                [% IF ( addSuccess ) %]
52
                      <div class="alert">Item with barcode <i>[% barcode %]</i> removed successfully!</div>
29
                  <div class="dialog message">Item with barcode '[% barcode %]' added successfully</div>
53
                    [% ELSE %]
30
                [% ELSE %]
54
                      <div class="alert">
31
                  <div class="dialog alert">
55
                        Failed to remove item with barcode <i>[% barcode %]</i>:
32
                    <p>Failed to add item with barcode <i>[% barcode %]</i>:
56
                        <p>
33
                    <p>
57
                            [% IF failureMessage == "NO_ITEM" %]
34
                        [% IF failureMessage == "NO_ITEM" %]
58
                                No item with matching barcode found!
35
                            No item with matching barcode found
59
                            [% ELSE %]
36
                        [% ELSIF failureMessage == "IN_COLLECTION_OTHER" %]
60
                                [% failureMessage %]
37
                            Item is already in a different rotating collection
61
                            [% END %]
38
                        [% ELSIF failureMessage == "IN_COLLECTION" %]
62
                        </p>
39
                            Item is already in this collection
63
                    </div>
40
                        [% ELSE %]
64
                    [% END %]
41
                            [% failureMessage %]
65
                  [% END %]
42
                        [% END %]
43
                    </p>
44
                </div>
45
                [% END %]
46
              [% END %]
66
47
67
                  <h3>Add item to <i>[% colTitle %]</i></h3>
48
              [% IF ( previousActionRemove ) %]
68
              </div>
49
                [% IF ( removeSuccess ) %]
50
                  <div class="dialog message">Item with barcode <i>[% barcode %]</i> removed successfully</div>
51
                [% ELSE %]
52
                  <div class="dialog alert">
53
                    Failed to remove item with barcode <i>[% barcode %]</i>:
54
                    <p>
55
                        [% IF failureMessage == "NO_ITEM" %]
56
                            No item with matching barcode found
57
                        [% ELSIF failureMessage == "NOT_IN_COLLECTION" %]
58
                            Item is not in this collection
59
                        [% ELSE %]
60
                            [% failureMessage %]
61
                        [% END %]
62
                    </p>
63
                </div>
64
                [% END %]
65
              [% END %]
69
66
70
              <div>
67
              <div>
71
                <form action="addItems.pl" method="post">
68
                <form action="addItems.pl" method="post">
72
                <table>
69
                    <fieldset class="brief">
73
                  <tr>
70
                        <legend>Add or remove items</legend>
74
                    <th><label for="barcode">Barcode: </label></td>
71
                        <ol>
75
                    <td><input type="text" id="barcode" name="barcode" /></td>
72
                            <li>
76
                    <td>
73
                                <label for="barcode">Barcode: </label>
77
                      [% IF ( removeChecked ) %]<input type="checkbox" name="removeItem" checked="checked" />
74
                                <input type="text" id="barcode" name="barcode" />
78
                      [% ELSE %]<input type="checkbox" name="removeItem" />[% END %]
75
                                [% IF ( removeChecked ) %]
79
                      <label for="removeItem">Remove item from collection</label>
76
                                    <label class="inline"><input type="checkbox" name="removeItem" checked="checked" /> Remove item from collection</label>
80
                    </td>
77
                                [% ELSE %]
81
                  </tr>
78
                                    <label class="inline"><input type="checkbox" name="removeItem" /> Remove item from collection</label>
79
                                [% END %]
80
                            </li>
81
                        </ol>
82
                        <p>
83
                            <input type="hidden" id="colId" name="colId" value="[% colId %]" />
84
                            <input type="hidden" name="action" value="addItem" />
85
                            <input type="submit" value="Submit" />
86
                        </p>
87
                    </fieldset>
82
88
83
                  <input type="hidden" id="colId" name="colId" value="[% colId %]" />
84
                  <input type="hidden" name="action" value="addItem" />
85
                  <tr><td align="right" colspan="99"><input class="btn" type="submit" value="Submit" /></td></tr>
86
                </table>
87
                </form>
89
                </form>
88
              </div>
90
              </div>
89
91
90
              <div>
92
              <div>
91
                <h2>Items in this collection</h2>
93
                <h2>Items in <i>[% colTitle %]</i></h2>
92
                [% IF ( collectionItemsLoop ) %]
94
                [% IF ( collectionItemsLoop ) %]
93
                  <table>
95
                  <table>
94
                    <tr>
96
                    <tr>
95
                      <th>Title</th>
97
                      <th>Title</th>
96
                      <th>Call number</th>
98
                      <th>Call number</th>
97
                      <th>Barcode</th>
99
                      <th>Barcode</th>
100
                      <th>&nbsp;</th>
98
                    </tr>
101
                    </tr>
99
                    [% FOREACH collectionItemsLoo IN collectionItemsLoop %]
102
                    [% FOREACH collectionItemsLoo IN collectionItemsLoop %]
100
                      <tr>
103
                      <tr>
101
                        <td>[% collectionItemsLoo.title |html %]</td>
104
                        <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = collectionItemsLoo.biblionumber %][% collectionItemsLoo.title |html %]</a></td>
102
                        <td>[% collectionItemsLoo.itemcallnumber %]</td>
105
                        <td>[% collectionItemsLoo.itemcallnumber %]</td>
103
                        <td>[% collectionItemsLoo.barcode %]</td>
106
                        <td>[% collectionItemsLoo.barcode %]</td>
107
                        <td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]&amp;barcode=[% collectionItemsLoo.barcode %]&amp;removeItem=1&amp;action=addItem">Remove</a></td>
104
                      </tr>
108
                      </tr>
105
                    [% END %]
109
                    [% END %]
106
                  </table>
110
                  </table>
107
                [% ELSE %]
111
                [% ELSE %]
108
                  There are no items in this collection.
112
                  <div class="dialog message">There are no items in this collection.</div>
109
                [% END %]
113
                [% END %]
110
              </div>
114
              </div>
111
115
112
              <div>
116
            </div> <!-- /.yui-b -->
113
                <br/>
117
        </div> <!-- /#yui-main -->
114
                <input type="button" value="Return to rotating collections home" onclick="window.location.href='rotatingCollections.pl'">
118
        <div class="yui-b">
115
              </div>
119
            [% INCLUDE 'tools-menu.inc' %]
116
117
            </div>
118
        </div>
120
        </div>
119
    </div>
121
    </div> <!-- /#bd -->
120
122
[% INCLUDE 'intranet-bottom.inc' %]
121
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt (-64 / +74 lines)
Lines 1-28 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Edit collections</title>
2
<title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo;
3
    [%- IF ( action == "new" ) %]
4
        Add a new collection
5
    [% ELSE %]
6
        Edit collection [% editColTitle %]
7
    [% END -%]
8
</title>
3
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
10
</head>
5
<body id="rcoll_editCollections" class="tools rcoll">
11
<body id="rcoll_editCollections" class="tools rcoll">
6
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'cat-search.inc' %]
13
[% INCLUDE 'cat-search.inc' %]
8
14
9
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; Edit collections</div>
15
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo;
16
    [%- IF ( action == "new" ) %]
17
        Add a new collection
18
    [% ELSE %]
19
        <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId %]">Collection <i>[% editColTitle %]</i></a> &rsaquo; Edit
20
    [% END -%]
21
</div>
10
22
11
<div id="doc3" class="yui-t2">
23
<div id="doc3" class="yui-t2">
12
    <div id="bd">
24
    <div id="bd">
13
        <div class="yui-b">
25
        <div id="yui-main">
14
           [% INCLUDE 'tools-menu.inc' %]
26
            <div class="yui-b">
15
        </div>
16
17
        <div class="yui-main">
18
            <div class="yui-bd">
19
27
20
              [% IF ( previousActionCreate ) %]
28
              [% IF ( previousActionCreate ) %]
21
                [% IF ( createSuccess ) %]
29
                [% IF ( createSuccess ) %]
22
                  <div class="alert">Collection <i>[% createdTitle %]</i> created successfully!</div>
30
                    <div class="dialog message">
31
                        <p>Collection <i>[% createdTitle %]</i> added successfully</p>
32
                        <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
33
                    </div>
23
                [% ELSE %]
34
                [% ELSE %]
24
                  <div class="alert">
35
                  <div class="dialog alert">
25
                    <p>Collection <i>[% createdTitle %]</i> failed to be created!</p>
36
                    <p>Collection <i>[% createdTitle %]</i> failed to be added</p>
26
                    <p>
37
                    <p>
27
                        [% IF failureMessage == "NO_TITLE" %]
38
                        [% IF failureMessage == "NO_TITLE" %]
28
                            No title entered.
39
                            No title entered.
Lines 38-55 Link Here
38
49
39
              [% IF ( previousActionDelete ) %]
50
              [% IF ( previousActionDelete ) %]
40
                [% IF ( deleteSuccess ) %]
51
                [% IF ( deleteSuccess ) %]
41
                  <div class="alert">Collection deleted successfully!</div>
52
                  <div class="dialog message">
53
                    <p>Collection deleted successfully</p>
54
                    <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
55
                  </div>
42
                [% ELSE %]
56
                [% ELSE %]
43
                  <div class="alert">Collection failed to be deleted!</div>
57
                  <div class="dialog alert">Collection failed to be deleted</div>
44
                [% END %]
58
                [% END %]
45
              [% END %]
59
              [% END %]
46
60
47
              [% IF ( previousActionUpdate ) %]
61
              [% IF ( previousActionUpdate ) %]
48
                [% IF ( updateSuccess ) %]
62
                [% IF ( updateSuccess ) %]
49
                  <div class="alert">Collection <i>[% updatedTitle %]</i> updated successfully!</div>
63
                  <div class="dialog message">
64
                      <p>Collection <i>[% updatedTitle %]</i> updated successfully</p>
65
                      <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
66
                  </div>
50
                [% ELSE %]
67
                [% ELSE %]
51
                  <div class="alert">
68
                  <div class="dialog alert">
52
                    <p>Collection <i>[% updatedTitle %]</i> failed to be updated!</p>
69
                    <p>Collection <i>[% updatedTitle %]</i> failed to be updated</p>
53
                    <p>
70
                    <p>
54
                        [% IF failureMessage == "NO_ID" %]
71
                        [% IF failureMessage == "NO_ID" %]
55
                            No collection id given.
72
                            No collection id given.
Lines 62-125 Link Here
62
              [% END %]
79
              [% END %]
63
80
64
              <div>
81
              <div>
65
                <br />
66
82
67
                [% IF action == "new" || action == "edit" %]
83
                [% IF action == "new" || action == "edit" %]
68
                    [% IF ( previousActionEdit ) %]
84
                    [% IF ( previousActionEdit ) %]
69
                      <h1>Edit collection <i>[% editColTitle %]</i></h1>
85
                      <h1>Edit collection <i>[% editColTitle %]</i></h1>
70
                    [% ELSE %]
86
                    [% ELSE %]
71
                      <h1>Create new collection</h1>
87
                      <h1>Add new collection</h1>
72
                    [% END %]
88
                    [% END %]
73
89
74
                    <form action="editCollections.pl" method="post">
90
                    <form action="editCollections.pl" method="post" class="validated">
75
                      [% IF ( previousActionEdit ) %]
91
                        [% IF ( previousActionEdit ) %]
76
                        <input type="hidden" name="action" value="update" />
92
                            <input type="hidden" name="action" value="update" />
77
                        <input type="hidden" name="colId" value="[% editColId %]" />
93
                            <input type="hidden" name="colId" value="[% editColId %]" />
78
                      [% ELSE %]
94
                        [% ELSE %]
79
                        <input type="hidden" name="action" value="create" />
95
                            <input type="hidden" name="action" value="create" />
80
                      [% END %]
96
                        [% END %]
81
82
                      <table>
83
                        <tr>
84
                          <td>
85
                            <label class="required" for="title">Title: </label>
86
                          </td>
87
                          <td>
88
                            [% IF ( editColTitle ) %]<input type="text" name="title" value="[% editColTitle %]" />
89
                            [% ELSE %]<input type="text" name="title" />[% END %]
90
                          </td>
91
                        </tr>
92
93
                        <tr>
94
                          <td>
95
                            <label class="required" for="description">Description: </label>
96
                          </td>
97
                          <td>
98
                            [% IF (editColDescription ) %]<input type="text" size="50" name="description" value="[% editColDescription %]" />
99
                            [% ELSE %]<input type="text" size="50" name="description" />[% END %]
100
                          </td>
101
                        </tr>
102
97
103
                        <tr>
98
                        <fieldset class="rows">
104
                          <td colspan="2">
99
                            <ol>
105
                            [% IF ( previousActionEdit ) %]
100
                                <li>
106
                              <input class="btn" type="submit" value="Update" />
101
                                    <label class="required" for="title">Title: </label>
107
                            [% ELSE %]
102
                                    [% IF ( editColTitle ) %]
108
                              <input class="btn" type="submit" value="Create" />
103
                                        <input type="text" name="title" value="[% editColTitle %]" required="required" />
109
                            [% END %]
104
                                        <span class="required">Required</span>
110
                          </td>
105
                                    [% ELSE %]
111
                        </tr>
106
                                        <input type="text" name="title" required="required" />
112
                      </table>
107
                                        <span class="required">Required</span>
108
                                    [% END %]
109
                                </li>
110
                                <li>
111
                                    <label class="required" for="description">Description: </label>
112
                                    [% IF (editColDescription ) %]
113
                                        <input type="text" size="50" name="description" value="[% editColDescription %]" required="required" />
114
                                        <span class="required">Required</span>
115
                                    [% ELSE %]
116
                                        <input type="text" size="50" name="description" required="required" />
117
                                        <span class="required">Required</span>
118
                                    [% END %]
119
                                </li>
120
                            </ol>
121
                        </fieldset>
122
                        <fieldset class="action">
123
                            <p><input type="submit" value="Submit" /> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a></p>
124
                        </fieldset>
113
                    </form>
125
                    </form>
114
                [% END %]
126
                [% END %]
115
              </div>
127
              </div>
116
128
117
              <p>
129
            </div> <!-- /.yui-b -->
118
                <a class="btn" href="rotatingCollections.pl">Return to rotating collections home</a>
130
        </div> <!-- /#yui-main -->
119
              </p>
131
        <div class="yui-b">
120
132
            [% INCLUDE 'tools-menu.inc' %]
121
            </div>
122
        </div>
133
        </div>
123
    </div>
134
    </div> <!-- /#bd -->
124
[% INCLUDE 'intranet-bottom.inc' %]
135
[% INCLUDE 'intranet-bottom.inc' %]
125
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt (-18 / +16 lines)
Lines 11-30 Link Here
11
11
12
<div id="doc3" class="yui-t2">
12
<div id="doc3" class="yui-t2">
13
    <div id="bd">
13
    <div id="bd">
14
        <div class="yui-b">
14
        <div id="yui-main">
15
            [% INCLUDE 'tools-menu.inc' %]
15
            <div class="yui-b">
16
        </div>
17
16
18
        <div class="yui-main">
17
                [% INCLUDE 'rotating-collections-toolbar.inc' %]
19
            <div class="yui-bd">
20
18
21
                <h1>Rotating collections</h1>
19
                <h1>Rotating collections</h1>
22
                <div>
20
                <div>
23
                    [% IF ( collectionsLoop ) %]
21
                    [% IF ( collectionsLoop ) %]
24
                        <table>
22
                        <table>
25
                            <tr>
23
                            <tr>
26
                                <th><strong>Title</strong></th>
24
                                <th>Title</th>
27
                                <th>Description</strong></th>
25
                                <th>Description</th>
28
                                <th>Current location</th>
26
                                <th>Current location</th>
29
                                <th>&nbsp;</th>
27
                                <th>&nbsp;</th>
30
                                <th>&nbsp;</th>
28
                                <th>&nbsp;</th>
Lines 34-58 Link Here
34
32
35
                            [% FOREACH collectionsLoo IN collectionsLoop %]
33
                            [% FOREACH collectionsLoo IN collectionsLoop %]
36
                                <tr>
34
                                <tr>
37
                                    <td>[% collectionsLoo.colTitle %]</td>
35
                                    <td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% collectionsLoo.colId %]">[% collectionsLoo.colTitle %]</a></td>
38
                                    <td>[% collectionsLoo.colDesc %]</td>
36
                                    <td>[% collectionsLoo.colDesc %]</td>
39
                                    <td>[% Branches.GetName( collectionsLoo.colBranchcode ) %]</td>
37
                                    <td>[% Branches.GetName( collectionsLoo.colBranchcode ) %]</td>
40
                                    <td><a href="addItems.pl?colId=[% collectionsLoo.colId %]">Add/remove items</a></td>
38
                                    <td><a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% collectionsLoo.colId %]">Add or remove items</a></td>
41
                                    <td><a href="transferCollection.pl?colId=[% collectionsLoo.colId %]">Transfer</a></td>
39
                                    <td><a href="/cgi-bin/koha/rotating_collections/transferCollection.pl?colId=[% collectionsLoo.colId %]">Transfer</a></td>
42
                                    <td><a href="editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td>
40
                                    <td><a href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&amp;colId=[% collectionsLoo.colId %]">Edit</a></td>
43
                                    <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td>
41
                                    <td><a href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&amp;colId=[% collectionsLoo.colId %]">Delete</a></td>
44
                                </tr>
42
                                </tr>
45
                            [% END %]
43
                            [% END %]
46
                        </table>
44
                        </table>
47
                    [% ELSE %]
45
                    [% ELSE %]
48
                        There are no collections currently defined.
46
                        <div class="dialog message">There are no collections currently defined.</div>
49
                    [% END %]
47
                    [% END %]
50
                </div>
48
                </div>
51
49
52
                <p>
50
            </div> <!-- /.yui-b -->
53
                    <a class="btn" href="editCollections.pl?action=new">Create collection</a>
51
        </div> <!-- /#yui-main -->
54
                </p>
52
        <div class="yui-b">
55
            </div>
53
            [% INCLUDE 'tools-menu.inc' %]
56
        </div>
54
        </div>
57
    </div>
55
    </div> <!-- /#bd -->
58
[% INCLUDE 'intranet-bottom.inc' %]
56
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt (-30 / +38 lines)
Lines 6-56 Link Here
6
[% INCLUDE 'header.inc' %]
6
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'cat-search.inc' %]
7
[% INCLUDE 'cat-search.inc' %]
8
8
9
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; Transfer collection</div>
9
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a> &rsaquo; <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId %]">Collection <i>[% colTitle %]</i></a> &rsaquo; Transfer collection</div>
10
10
11
<div id="doc3" class="yui-t2">
11
<div id="doc3" class="yui-t2">
12
    <div id="bd">
12
    <div id="bd">
13
        <div class="yui-b">
13
        <div id="yui-main">
14
            [% INCLUDE 'tools-menu.inc' %]
14
            <div class="yui-b">
15
        </div>
16
15
17
        <div class="yui-main">
16
                <h1>Transfer collection <i>[% colTitle %]</i></h1>
18
            <div class="yui-bd">
19
                <h1>Rotating collections: Transfer collection</h1>
20
17
21
                [% IF ( transferSuccess ) %]
18
                [% IF ( transferSuccess ) %]
22
                    <div class="alert">Collection transferred successfully</div>
19
                    <div class="dialog message">
20
                        <p>Collection transferred successfully</p>
21
                        <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
22
                    </div>
23
                [% ELSIF ( transferFailure ) %]
23
                [% ELSIF ( transferFailure ) %]
24
                    <div class="alert">Failed to transfer collection!</div>
24
                    <div class="dialog alert">
25
                        <p>Failed to transfer collection</p>
26
                        <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
27
                    </div>
25
                [% END %]
28
                [% END %]
26
29
27
                [% IF ( transferSuccess ) %]
30
                [% IF ( transferSuccess ) %]
28
                [% ELSE %]
31
                [% ELSE %]
29
                    <div>
32
                    <div>
30
                        <form action="transferCollection.pl" method="post">
33
                        <form action="transferCollection.pl" method="post">
31
                            <input type="hidden" name="colId" value="[% colId %]">
34
                            <input type="hidden" name="colId" value="[% colId %]" />
32
35
                            <fieldset class="rows">
33
                            <label for="toBranch">Choose your library:</label>
36
                                <ol>
34
                            <select name="toBranch">
37
                                    <li>
35
                                [% FOREACH branchoptionloo IN branchoptionloop %]
38
                                        <label for="toBranch">Choose your library:</label>
36
                                    [% IF ( branchoptionloo.selected ) %]
39
                                        <select id="toBranch" name="toBranch">
37
                                        <option value="[% branchoptionloo.code %]" selected="selected">[% branchoptionloo.name %]</option>
40
                                            [% FOREACH branchoptionloo IN branchoptionloop %]
38
                                    [% ELSE %]
41
                                                [% IF ( branchoptionloo.selected ) %]
39
                                        <option value="[% branchoptionloo.code %]">[% branchoptionloo.name %]</option>
42
                                                    <option value="[% branchoptionloo.code %]" selected="selected">[% branchoptionloo.name %]</option>
40
                                    [% END %]
43
                                                [% ELSE %]
41
                                [% END %]
44
                                                    <option value="[% branchoptionloo.code %]">[% branchoptionloo.name %]</option>
42
                            </select>
45
                                                [% END %]
43
46
                                            [% END %]
44
                            <input class="btn" type="submit" value="Transfer collection">
47
                                        </select>
48
                                    </li>
49
                                </ol>
50
                            </fieldset>
51
                            <fieldset class="action">
52
                                <input type="submit" value="Transfer collection"> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a>
53
                            </fieldset>
45
                        </form>
54
                        </form>
46
                    </div>
55
                    </div>
47
                [% END %]
56
                [% END %]
48
57
49
                <p>
58
            </div> <!-- /.yui-b -->
50
                    <a class="btn" href="rotatingCollections.pl">Return to rotating collections home</a>
59
        </div> <!-- /#yui-main -->
51
                </p>
60
        <div class="yui-b">
52
61
            [% INCLUDE 'tools-menu.inc' %]
53
            </div>
54
        </div>
62
        </div>
55
    </div>
63
    </div> <!-- /#bd -->
56
[% INCLUDE 'intranet-bottom.inc' %]
64
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt (-1 / +1 lines)
Lines 144-150 Link Here
144
144
145
    [% IF ( CAN_user_tools_rotating_collections ) %]
145
    [% IF ( CAN_user_tools_rotating_collections ) %]
146
    <dt><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a></dt>
146
    <dt><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a></dt>
147
    <dd>Manage Rotating Collections</dd>
147
    <dd>Manage rotating collections</dd>
148
    [% END %]
148
    [% END %]
149
149
150
    [% IF ( CAN_user_tools_marc_modification_templates ) %]
150
    [% IF ( CAN_user_tools_marc_modification_templates ) %]
(-)a/rotating_collections/addItems.pl (-5 lines)
Lines 95-105 if ($collectionItems) { Link Here
95
}
95
}
96
96
97
$template->param(
97
$template->param(
98
    intranetcolorstylesheet =>
99
      C4::Context->preference("intranetcolorstylesheet"),
100
    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
101
    IntranetNav        => C4::Context->preference("IntranetNav"),
102
103
    colId          => $colId,
98
    colId          => $colId,
104
    colTitle       => $colTitle,
99
    colTitle       => $colTitle,
105
    colDescription => $colDescription,
100
    colDescription => $colDescription,
(-)a/rotating_collections/editCollections.pl (-7 lines)
Lines 114-124 elsif ( $action eq 'update' ) { Link Here
114
    }
114
    }
115
}
115
}
116
116
117
$template->param(
118
    intranetcolorstylesheet =>
119
      C4::Context->preference("intranetcolorstylesheet"),
120
    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
121
    IntranetNav        => C4::Context->preference("IntranetNav"),
122
);
123
124
output_html_with_http_headers $query, $cookie, $template->output;
117
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/rotating_collections/rotatingCollections.pl (-5 lines)
Lines 43-53 my $branchcode = $query->cookie('branch'); Link Here
43
my $collections = GetCollections();
43
my $collections = GetCollections();
44
44
45
$template->param(
45
$template->param(
46
    intranetcolorstylesheet =>
47
      C4::Context->preference("intranetcolorstylesheet"),
48
    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
49
    IntranetNav        => C4::Context->preference("IntranetNav"),
50
51
    collectionsLoop => $collections,
46
    collectionsLoop => $collections,
52
);
47
);
53
48
(-)a/rotating_collections/transferCollection.pl (-6 lines)
Lines 73-83 foreach my $br ( keys %$branches ) { Link Here
73
## Get data about collection
73
## Get data about collection
74
my ( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection($colId);
74
my ( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection($colId);
75
$template->param(
75
$template->param(
76
    intranetcolorstylesheet =>
77
      C4::Context->preference("intranetcolorstylesheet"),
78
    intranetstylesheet => C4::Context->preference("intranetstylesheet"),
79
    IntranetNav        => C4::Context->preference("IntranetNav"),
80
81
    colId            => $colId,
76
    colId            => $colId,
82
    colTitle         => $colTitle,
77
    colTitle         => $colTitle,
83
    colDesc          => $colDesc,
78
    colDesc          => $colDesc,
84
- 

Return to bug 8836