Merge remote-tracking branch 'kc/new/enh/bug_5263' into kcmaster
[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>
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             <tr>
48               <th>Title</th>
49               <th>Description</th>
50               <th>Holding Library</th>
51               <td></td>
52               <td></td>
53             </tr>
54             [% FOREACH collectionsLoo IN collectionsLoop %]
55               <tr>
56                 <td>[% collectionsLoo.colTitle %]</td>
57                 <td>[% collectionsLoo.colDesc %]</td>
58                 <td>[% collectionsLoo.colBranchcode %]</td>
59                 <td><a href="editCollections.pl?action=edit&colId=[% collectionsLoo.colId %]">Edit</a></td>
60                 <td><a href="editCollections.pl?action=delete&colId=[% collectionsLoo.colId %]">Delete</a></td>
61               </tr>
62             [% END %]
63           </table>
64         [% ELSE %]
65           There are no Collections currently defined.
66         [% END %]
67       </div>    
68
69       <div>
70         <br />
71
72         [% IF ( previousActionEdit ) %]
73           <h1>Edit Collection</h1>
74         [% ELSE %]
75           <h1>Create New Collection</h1>
76         [% END %]
77
78         <form action="editCollections.pl" method="post">
79           [% IF ( previousActionEdit ) %]
80             <input type="hidden" name="action" value="update" />
81             <input type="hidden" name="colId" value="[% editColId %]" />
82           [% ELSE %]
83             <input type="hidden" name="action" value="create" />
84           [% END %]
85
86           <table>
87             <tr>
88               <td>
89                 <label for="title">Title: </label>
90               </td>
91               <td>
92                 [% IF ( editColTitle ) %]<input type="text" name="title" value="[% editColTitle %]" />
93                 [% ELSE %]<input type="text" name="title" />[% END %]
94               </td>
95             </tr>
96         
97             <tr>
98               <td>
99                 <label for="description">Description: </label>
100               </td>
101               <td>
102                 [% IF (editColDescription ) %]<input type="text" size="50" name="description" value="[ editColDescription %]" />
103                 [% ELSE %]<input type="text" size="50" name="description" />[% END %]
104               </td>
105             </tr>
106
107             <tr>
108               <td colspan="2">
109                 [% IF ( previousActionEdit ) %]
110                   <input type="submit" value="Update" />
111                 [% ELSE %]
112                   <input type="submit" value="Create" />
113                 [% END %]
114               </td>
115             </tr>
116           </table>
117         </form>
118       </div>
119
120       <div>
121         <br/>
122         <input type="button" value="Return to Rotating Collections Home" onclick="window.location.href='rotatingCollections.pl'">
123       </div>
124
125 </div>
126 </div>
127 [% INCLUDE 'intranet-bottom.inc' %]
128