3 [% PROCESS 'i18n.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% FILTER collapse %]
7 [% IF ( action == "new" ) %]
8 [% t("Add a new collection") | html %]
9 [% ELSIF ( action == "delete" ) %]
10 [% t("Collection deleted") | html %]
12 [% t("Edit collection") | html %] ›
13 [% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %]
15 [% t("Rotating collections") | html %] ›
16 [% t("Tools") | html %] ›
17 [% t("Koha") | html %]
19 [% INCLUDE 'doc-head-close.inc' %]
21 <body id="rcoll_editCollections" class="tools rcoll">
22 [% WRAPPER 'header.inc' %]
23 [% INCLUDE 'cat-search.inc' %]
26 [% WRAPPER 'sub-header.inc' %]
27 [% WRAPPER breadcrumbs %]
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
31 [% WRAPPER breadcrumb_item %]
32 <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a>
35 [%- IF ( action == "new" ) %]
36 [% WRAPPER breadcrumb_item bc_active= 1 %]
37 <span>Add a new collection</span>
39 [% ELSIF ( action == "delete" ) %]
40 [% WRAPPER breadcrumb_item bc_active= 1 %]
41 <span>Collection deleted</span>
44 [% WRAPPER breadcrumb_item %]
45 <a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId | uri %]">[% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %]</em></a>
47 [% WRAPPER breadcrumb_item bc_active= 1 %]
48 [% t("Edit collection") | html %]
51 [% END #/ WRAPPER breadcrumbs %]
52 [% END #/ WRAPPER sub-header.inc %]
54 <div class="main container-fluid">
56 <div class="col-sm-10 col-sm-push-2">
59 [% IF ( previousActionCreate ) %]
60 [% IF ( createSuccess ) %]
61 <div class="dialog message">
62 <p>Collection <em>[% createdTitle | html %]</em> added successfully</p>
63 <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
66 <div class="dialog alert">
67 <p>Collection <em>[% createdTitle | html %]</em> failed to be added</p>
69 [% IF failureMessage == "NO_TITLE" %]
70 <span>No title entered.</span>
71 [% ELSIF failureMessage == "DUPLICATE_TITLE" %]
72 <span>Title already in use.</span>
73 [% ELSIF failureMessage == "NO_DESCRIPTION" %]
74 <span>No description entered.</span>
76 [% failureMessage | html %]
83 [% IF ( previousActionDelete ) %]
84 [% IF ( deleteSuccess ) %]
85 <div class="dialog message">
86 <p>Collection deleted successfully</p>
87 <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
90 <div class="dialog alert">Collection failed to be deleted</div>
94 [% IF ( previousActionUpdate ) %]
95 [% IF ( updateSuccess ) %]
96 <div class="dialog message">
97 <p>Collection <em>[% updatedTitle | html %]</em> updated successfully</p>
98 <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
101 <div class="dialog alert">
102 <p>Collection <em>[% updatedTitle | html %]</em> failed to be updated</p>
104 [% IF failureMessage == "NO_ID" %]
105 No collection id given.
106 [% ELSIF failureMessage == "DUPLICATE_TITLE" %]
107 Title already in use.
109 [% failureMessage | html %]
118 [% IF action == "new" || action == "edit" %]
119 [% IF ( previousActionEdit ) %]
120 <h1>Edit collection <em>[% editColTitle | html %]</em></h1>
122 <h1>Add new collection</h1>
125 <form action="editCollections.pl" method="post" class="validated">
126 [% IF ( previousActionEdit ) %]
127 <input type="hidden" name="action" value="update" />
128 <input type="hidden" name="colId" value="[% editColId | html %]" />
130 <input type="hidden" name="action" value="create" />
133 <fieldset class="rows">
136 <label class="required" for="title">Title: </label>
137 [% IF ( editColTitle ) %]
138 <input type="text" name="title" value="[% editColTitle | html %]" required="required" />
139 <span class="required">Required</span>
141 <input type="text" name="title" required="required" />
142 <span class="required">Required</span>
146 <label for="description">Description: </label>
147 [% IF (editColDescription ) %]
148 <input type="text" size="50" name="description" value="[% editColDescription | html %]" />
150 <input type="text" size="50" name="description" />
155 <fieldset class="action">
156 <p><input type="submit" class="btn btn-primary" value="Submit" /> <a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl" class="cancel">Cancel</a></p>
163 </div> <!-- /.col-sm-10.col-sm-push-2 -->
165 <div class="col-sm-2 col-sm-pull-10">
167 [% INCLUDE 'tools-menu.inc' %]
169 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
170 </div> <!-- /.row -->
172 [% MACRO jsinclude BLOCK %]
173 [% Asset.js("js/tools-menu.js") | $raw %]
174 [% Asset.js("js/rotating-collections.js") | $raw %]
177 [% INCLUDE 'intranet-bottom.inc' %]