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