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