Bug 15758: Koha::Libraries - Remove GetBranchName
[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;
3     [%- IF ( action == "new" ) %]
4         Add a new collection
5     [% ELSE %]
6         Edit collection [% editColTitle %]
7     [% END -%]
8 </title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11 <body id="rcoll_editCollections" class="tools rcoll">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
14
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>
22
23 <div id="doc3" class="yui-t2">
24     <div id="bd">
25         <div id="yui-main">
26             <div class="yui-b">
27
28               [% IF ( previousActionCreate ) %]
29                 [% IF ( createSuccess ) %]
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>
34                 [% ELSE %]
35                   <div class="dialog alert">
36                     <p>Collection <i>[% createdTitle %]</i> failed to be added</p>
37                     <p>
38                         [% IF failureMessage == "NO_TITLE" %]
39                             No title entered.
40                         [% ELSIF failureMessage == "DUPLICATE_TITLE" %]
41                             Title already in use.
42                         [% ELSIF failureMessage == "NO_DESCRIPTION" %]
43                             No description entered.
44                         [% ELSE %]
45                             [% failureMessage %]
46                         [% END %]
47                     </p>
48                   </div>
49                 [% END %]
50               [% END %]
51
52               [% IF ( previousActionDelete ) %]
53                 [% IF ( deleteSuccess ) %]
54                   <div class="dialog message">
55                     <p>Collection deleted successfully</p>
56                     <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
57                   </div>
58                 [% ELSE %]
59                   <div class="dialog alert">Collection failed to be deleted</div>
60                 [% END %]
61               [% END %]
62
63               [% IF ( previousActionUpdate ) %]
64                 [% IF ( updateSuccess ) %]
65                   <div class="dialog message">
66                       <p>Collection <i>[% updatedTitle %]</i> updated successfully</p>
67                       <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
68                   </div>
69                 [% ELSE %]
70                   <div class="dialog alert">
71                     <p>Collection <i>[% updatedTitle %]</i> failed to be updated</p>
72                     <p>
73                         [% IF failureMessage == "NO_ID" %]
74                             No collection id given.
75                         [% ELSIF failureMessage == "DUPLICATE_TITLE" %]
76                             Title already in use.
77                         [% ELSE %]
78                             [% failureMessage %]
79                         [% END %]
80                     </p>
81                 </div>
82                 [% END %]
83               [% END %]
84
85               <div>
86
87                 [% IF action == "new" || action == "edit" %]
88                     [% IF ( previousActionEdit ) %]
89                       <h1>Edit collection <i>[% editColTitle %]</i></h1>
90                     [% ELSE %]
91                       <h1>Add new collection</h1>
92                     [% END %]
93
94                     <form action="editCollections.pl" method="post" class="validated">
95                         [% IF ( previousActionEdit ) %]
96                             <input type="hidden" name="action" value="update" />
97                             <input type="hidden" name="colId" value="[% editColId %]" />
98                         [% ELSE %]
99                             <input type="hidden" name="action" value="create" />
100                         [% END %]
101
102                         <fieldset class="rows">
103                             <ol>
104                                 <li>
105                                     <label class="required" for="title">Title: </label>
106                                     [% IF ( editColTitle ) %]
107                                         <input type="text" name="title" value="[% editColTitle %]" required="required" />
108                                         <span class="required">Required</span>
109                                     [% ELSE %]
110                                         <input type="text" name="title" required="required" />
111                                         <span class="required">Required</span>
112                                     [% END %]
113                                 </li>
114                                 <li>
115                                     <label for="description">Description: </label>
116                                     [% IF (editColDescription ) %]
117                                         <input type="text" size="50" name="description" value="[% editColDescription %]" />
118                                     [% ELSE %]
119                                         <input type="text" size="50" name="description" />
120                                     [% END %]
121                                 </li>
122                             </ol>
123                         </fieldset>
124                         <fieldset class="action">
125                             <p><input type="submit" value="Submit" /> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a></p>
126                         </fieldset>
127                     </form>
128                 [% END %]
129               </div>
130
131             </div> <!-- /.yui-b -->
132         </div> <!-- /#yui-main -->
133         <div class="yui-b">
134             [% INCLUDE 'tools-menu.inc' %]
135         </div>
136     </div> <!-- /#bd -->
137 [% INCLUDE 'intranet-bottom.inc' %]