Merge remote branch 'kc/new/bug_3072' 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                <input type="text" name="title" [% IF ( editColTitle ) %] value="[% editColTitle %]" [% END %] />
93               </td>
94             </tr>
95         
96             <tr>
97               <td>
98                 <label for="description">Description: </label>
99               </td>
100               <td>
101                 <input type="text" size="50" name="description" [% IF ( editColDescription ) %] value="[% editColDescription %]" [% END %] />
102               </td>
103             </tr>
104
105             <tr>
106               <td colspan="2">
107                 [% IF ( previousActionEdit ) %]
108                   <input type="submit" value="Update" />
109                 [% ELSE %]
110                   <input type="submit" value="Create" />
111                 [% END %]
112               </td>
113             </tr>
114           </table>
115         </form>
116       </div>
117
118       <div>
119         <br/>
120         <input type="button" value="Return to Rotating Collections Home" onclick="window.location.href='rotatingCollections.pl'">
121       </div>
122
123 </div>
124 </div>
125 [% INCLUDE 'intranet-bottom.inc' %]
126