]> git.koha-community.org Git - koha.git/blob - koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
Bug 8836 - Resurrect Rotating Collections
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / rotating_collections / editCollections.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; Rotating collections &rsaquo; Edit collections</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5 <body id="rcoll_editCollections" class="tools rcoll">
6 [% INCLUDE 'header.inc' %]
7 [% INCLUDE 'cat-search.inc' %]
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; Edit collections</div>
10
11 <div id="doc3">
12 <div id="bd">
13         <div class="yui-gb">
14       <h1>Rotating collections: Edit collections</h1>
15
16 <!--
17       [% IF ( previousActionCreate ) %]
18         [% IF ( createSuccess ) %]
19           <div>Collection '[% createdTitle %]' Created successfully!</div>
20         [% ELSE %]
21           <div>Collection '[% createdTitle %]' Failed to be created!</div>
22           <div>Reason: <strong>[% failureMessage %]</strong></div>
23         [% END %]
24       [% END %]
25
26       [% IF ( previousActionDelete ) %]
27         [% IF ( DeleteSuccess ) %]
28           <div>Collection Deleted successfully!</div>
29         [% ELSE %]
30           <div>Collection Failed to be deleted!</div>
31         [% END %]
32       [% END %]
33 -->
34
35       [% IF ( previousActionUpdate ) %]
36         [% IF ( updateSuccess ) %]
37           <div>Collection '[% updatedTitle %]' Updated successfully!</div>
38         [% ELSE %]
39           <div>Collection '[% updatedTitle %]' Failed to be updated!</div>
40           <div>Reason: <strong>[% failureMessage %]</strong></div>
41         [% END %]
42       [% END %]
43
44       <div>
45         [% IF ( collectionsLoop ) %]
46           <table>
47            <thead>
48             <tr>
49               <th>Title</th>
50               <th>Description</th>
51               <th>Holding library</th>
52               <th>&nbsp;</th>
53               <th>&nbsp;</th>
54             </tr>
55            <thead>
56            <tbody>
57             [% FOREACH collectionsLoo IN collectionsLoop %]
58               <tr>
59                 <td>[% collectionsLoo.colTitle %]</td>
60                 <td>[% collectionsLoo.colDesc %]</td>
61                 <td>[% collectionsLoo.colBranchcode %]</td>
62                 <td><a href="editCollections.pl?action=edit&amp;colId=[% collectionsLoo.colId %]">Edit</a></td>
63                 <td><a href="editCollections.pl?action=delete&amp;colId=[% collectionsLoo.colId %]">Delete</a></td>
64               </tr>
65             [% END %]
66            </tbody>
67           </table>
68         [% ELSE %]
69           There are no collections currently defined.
70         [% END %]
71       </div>    
72
73       <div>
74         <br />
75
76         [% IF ( previousActionEdit ) %]
77           <h1>Edit Collection</h1>
78         [% ELSE %]
79           <h1>Create new collection</h1>
80         [% END %]
81
82         <form action="editCollections.pl" method="post">
83           [% IF ( previousActionEdit ) %]
84             <input type="hidden" name="action" value="update" />
85             <input type="hidden" name="colId" value="[% editColId %]" />
86           [% ELSE %]
87             <input type="hidden" name="action" value="create" />
88           [% END %]
89
90           <table>
91             <tr>
92               <td>
93                 <label for="title">Title: </label>
94               </td>
95               <td>
96                 [% IF ( editColTitle ) %]<input type="text" name="title" value="[% editColTitle %]" />
97                 [% ELSE %]<input type="text" name="title" />[% END %]
98               </td>
99             </tr>
100         
101             <tr>
102               <td>
103                 <label for="description">Description: </label>
104               </td>
105               <td>
106                 [% IF (editColDescription ) %]<input type="text" size="50" name="description" value="[% editColDescription %]" />
107                 [% ELSE %]<input type="text" size="50" name="description" />[% END %]
108               </td>
109             </tr>
110
111             <tr>
112               <td colspan="2">
113                 [% IF ( previousActionEdit ) %]
114                   <input type="submit" value="Update" />
115                 [% ELSE %]
116                   <input type="submit" value="Create" />
117                 [% END %]
118               </td>
119             </tr>
120           </table>
121         </form>
122       </div>
123
124       <div>
125         <br/>
126         <input type="button" value="Return to rotating collections home" onclick="window.location.href='rotatingCollections.pl'">
127       </div>
128
129 </div>
130 </div>
131 [% INCLUDE 'intranet-bottom.inc' %]
132