Lines 4-10
Link Here
|
4 |
[%- IF ( action == "new" ) %] |
4 |
[%- IF ( action == "new" ) %] |
5 |
Add a new collection |
5 |
Add a new collection |
6 |
[% ELSE %] |
6 |
[% ELSE %] |
7 |
Edit collection [% editColTitle %] |
7 |
Edit collection [% collection.colTitle %] |
8 |
[% END -%] |
8 |
[% END -%] |
9 |
</title> |
9 |
</title> |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
Lines 17-23
Link Here
|
17 |
[%- IF ( action == "new" ) %] |
17 |
[%- IF ( action == "new" ) %] |
18 |
Add a new collection |
18 |
Add a new collection |
19 |
[% ELSE %] |
19 |
[% ELSE %] |
20 |
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId %]">Collection <i>[% editColTitle %]</i></a> › Edit |
20 |
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% collection.colId %]">Collection <i>[% collection.colTitle %]</i></a> › Edit |
21 |
[% END -%] |
21 |
[% END -%] |
22 |
</div> |
22 |
</div> |
23 |
|
23 |
|
Lines 26-93
Link Here
|
26 |
<div id="yui-main"> |
26 |
<div id="yui-main"> |
27 |
<div class="yui-b"> |
27 |
<div class="yui-b"> |
28 |
|
28 |
|
29 |
[% IF ( previousActionCreate ) %] |
29 |
[% IF messages %] |
30 |
[% IF ( createSuccess ) %] |
30 |
<div class="dialog message"> |
31 |
<div class="dialog message"> |
31 |
[% FOR message IN messages %] |
32 |
<p>Collection <i>[% createdTitle %]</i> added successfully</p> |
32 |
[% IF message.code == "success_on_insert" %] |
33 |
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p> |
33 |
<p>Collection <i>[% createdTitle %]</i> added successfully</p> |
34 |
</div> |
34 |
[% ELSIF message.code == "success_on_delete" %] |
35 |
[% ELSE %] |
35 |
<p>Collection deleted successfully</p> |
36 |
<div class="dialog alert"> |
36 |
[% ELSIF message.code == "success_on_update" %] |
37 |
<p>Collection <i>[% createdTitle %]</i> failed to be added</p> |
37 |
<p>Collection <i>[% updatedTitle %]</i> updated successfully</p> |
38 |
<p> |
38 |
[% END %] |
39 |
[% IF failureMessage == "NO_TITLE" %] |
39 |
[% END %] |
40 |
No title entered. |
40 |
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p> |
41 |
[% ELSIF failureMessage == "DUPLICATE_TITLE" %] |
41 |
</div> |
42 |
Title already in use. |
|
|
43 |
[% ELSIF failureMessage == "NO_DESCRIPTION" %] |
44 |
No description entered. |
45 |
[% ELSE %] |
46 |
[% failureMessage %] |
47 |
[% END %] |
48 |
</p> |
49 |
</div> |
50 |
[% END %] |
51 |
[% END %] |
52 |
|
53 |
[% IF ( previousActionDelete ) %] |
54 |
[% IF ( deleteSuccess ) %] |
55 |
<div class="dialog message"> |
56 |
<p>Collection deleted successfully</p> |
57 |
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p> |
58 |
</div> |
59 |
[% ELSE %] |
60 |
<div class="dialog alert">Collection failed to be deleted</div> |
61 |
[% END %] |
62 |
[% END %] |
42 |
[% END %] |
63 |
|
43 |
|
64 |
[% IF ( previousActionUpdate ) %] |
44 |
[% IF errors %] |
65 |
[% IF ( updateSuccess ) %] |
45 |
<div class="dialog alert"> |
66 |
<div class="dialog message"> |
46 |
[% FOR error IN errors %] |
67 |
<p>Collection <i>[% updatedTitle %]</i> updated successfully</p> |
47 |
[% IF error.code == "error_on_insert" %] |
68 |
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p> |
48 |
<p>Collection <i>[% createdTitle %]</i> failed to be added</p> |
69 |
</div> |
49 |
[% ELSIF error.code == "error_on_delete" %] |
70 |
[% ELSE %] |
50 |
<p>Collection failed to be deleted</p> |
71 |
<div class="dialog alert"> |
51 |
[% ELSIF error.code == "error_on_updated" %] |
72 |
<p>Collection <i>[% updatedTitle %]</i> failed to be updated</p> |
52 |
<p>Collection <i>[% updatedTitle %]</i> failed to be updated</p> |
73 |
<p> |
53 |
[% END %] |
74 |
[% IF failureMessage == "NO_ID" %] |
54 |
[% END %] |
75 |
No collection id given. |
55 |
<p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p> |
76 |
[% ELSIF failureMessage == "DUPLICATE_TITLE" %] |
|
|
77 |
Title already in use. |
78 |
[% ELSE %] |
79 |
[% failureMessage %] |
80 |
[% END %] |
81 |
</p> |
82 |
</div> |
56 |
</div> |
83 |
[% END %] |
|
|
84 |
[% END %] |
57 |
[% END %] |
85 |
|
58 |
|
86 |
<div> |
59 |
<div> |
87 |
|
60 |
|
88 |
[% IF action == "new" || action == "edit" %] |
61 |
[% IF action == "new" || action == "edit" %] |
89 |
[% IF ( previousActionEdit ) %] |
62 |
[% IF ( previousActionEdit ) %] |
90 |
<h1>Edit collection <i>[% editColTitle %]</i></h1> |
63 |
<h1>Edit collection <i>[% collection.colTitle %]</i></h1> |
91 |
[% ELSE %] |
64 |
[% ELSE %] |
92 |
<h1>Add new collection</h1> |
65 |
<h1>Add new collection</h1> |
93 |
[% END %] |
66 |
[% END %] |
Lines 95-101
Link Here
|
95 |
<form action="editCollections.pl" method="post" class="validated"> |
68 |
<form action="editCollections.pl" method="post" class="validated"> |
96 |
[% IF ( previousActionEdit ) %] |
69 |
[% IF ( previousActionEdit ) %] |
97 |
<input type="hidden" name="action" value="update" /> |
70 |
<input type="hidden" name="action" value="update" /> |
98 |
<input type="hidden" name="colId" value="[% editColId %]" /> |
71 |
<input type="hidden" name="colId" value="[% collection.colId %]" /> |
99 |
[% ELSE %] |
72 |
[% ELSE %] |
100 |
<input type="hidden" name="action" value="create" /> |
73 |
<input type="hidden" name="action" value="create" /> |
101 |
[% END %] |
74 |
[% END %] |
Lines 104-111
Link Here
|
104 |
<ol> |
77 |
<ol> |
105 |
<li> |
78 |
<li> |
106 |
<label class="required" for="title">Title: </label> |
79 |
<label class="required" for="title">Title: </label> |
107 |
[% IF ( editColTitle ) %] |
80 |
[% IF ( collection.colTitle ) %] |
108 |
<input type="text" name="title" value="[% editColTitle %]" required="required" /> |
81 |
<input type="text" name="title" value="[% collection.colTitle %]" required="required" /> |
109 |
<span class="required">Required</span> |
82 |
<span class="required">Required</span> |
110 |
[% ELSE %] |
83 |
[% ELSE %] |
111 |
<input type="text" name="title" required="required" /> |
84 |
<input type="text" name="title" required="required" /> |
Lines 114-121
Link Here
|
114 |
</li> |
87 |
</li> |
115 |
<li> |
88 |
<li> |
116 |
<label for="description">Description: </label> |
89 |
<label for="description">Description: </label> |
117 |
[% IF (editColDescription ) %] |
90 |
[% IF (collection.colDesc ) %] |
118 |
<input type="text" size="50" name="description" value="[% editColDescription %]" /> |
91 |
<input type="text" size="50" name="description" value="[% collection.colDesc %]" /> |
119 |
[% ELSE %] |
92 |
[% ELSE %] |
120 |
<input type="text" size="50" name="description" /> |
93 |
<input type="text" size="50" name="description" /> |
121 |
[% END %] |
94 |
[% END %] |