Line 0
Link Here
|
|
|
1 |
[% USE KohaDates %] |
2 |
[% USE Koha %] |
3 |
[% SET link_opac_base = Koha.Preference( 'OPACBaseURL' ) %] |
4 |
[% SET link_opac = link_opac_base _ '/cgi-bin/koha/opac-cmspages.pl' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Koha › Tools › Pages</title> |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
8 |
[% IF ( opac_page_count ) %] |
9 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
10 |
[% INCLUDE 'datatables.inc' %] |
11 |
<script type="text/javascript">//<![CDATA[ |
12 |
$(document).ready(function() { |
13 |
$("#newst").dataTable($.extend(true, {}, dataTablesDefaults, { |
14 |
"aoColumnDefs": [ |
15 |
{ "aTargets": [ 0,-1,-2 ], "bSortable": false }, |
16 |
{ "aTargets": [ 0, -1 ], "bSearchable": false }, |
17 |
{ 'sType': "title-string", 'aTargets' : [ 'title-string'] } |
18 |
], |
19 |
"sPaginationType": "full_numbers" |
20 |
})); |
21 |
}); |
22 |
//]]> |
23 |
</script> |
24 |
[% END %] |
25 |
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script> |
26 |
<script type="text/javascript">//<![CDATA[ |
27 |
var MSG_CONFIRM_DELETE_PAGE = _("Are you sure you want to delete the selected page?"); |
28 |
|
29 |
tinyMCE.init({ |
30 |
mode : "textareas", |
31 |
theme : "advanced", |
32 |
convert_urls : false, |
33 |
relative_urls : false, |
34 |
content_css : "[% themelang %]/css/tinymce.css", |
35 |
plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu", |
36 |
theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print", |
37 |
theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap", |
38 |
theme_advanced_buttons3 : "", |
39 |
theme_advanced_toolbar_location : "top", |
40 |
theme_advanced_toolbar_align : "left", |
41 |
theme_advanced_path_location : "bottom", |
42 |
theme_advanced_resizing : true, |
43 |
plugin_insertdate_dateFormat : "%Y-%m-%d", |
44 |
plugin_insertdate_timeFormat : "%H:%M:%S", |
45 |
apply_source_formatting : true, |
46 |
height : "300", |
47 |
width : "700" |
48 |
//]]> |
49 |
}); |
50 |
//]]> |
51 |
</script> |
52 |
</head> |
53 |
<body id="tools_koha-content" class="tools"> |
54 |
[% INCLUDE 'header.inc' %] |
55 |
[% INCLUDE 'cat-search.inc' %] |
56 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( form ) %]<a href="[% link_self %]">Pages</a> › [% IF ( id ) %] |
57 |
Edit page[% ELSE %]Add page[% END %][% ELSE %]Pages[% END %]</div> |
58 |
|
59 |
[% IF ( form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] |
60 |
<div id="bd"> |
61 |
<div id="yui-main"> |
62 |
<div class="yui-b"> |
63 |
|
64 |
[% UNLESS ( link_opac_base && link_self) %] |
65 |
<div class="dialog alert"> |
66 |
[% UNLESS ( link_opac_base ) %] |
67 |
Warning: Preference <em>OPACBaseURL</em> not set, some links might not work!</div> |
68 |
[% END %] |
69 |
[% UNLESS ( link_self ) %] |
70 |
Warning: Variable <em>link_self</em> not set, some links might not work!</div> |
71 |
[% END %] |
72 |
[% END %] |
73 |
[% UNLESS ( form ) %] |
74 |
[% IF error_message == 'title_missing' %] |
75 |
<div class="dialog alert">Error: Required page title missing!</div> |
76 |
[% END %] |
77 |
<div id="toolbar" class="btn-toolbar"> |
78 |
<a class="btn btn-small" id="newentry" href="[% link_self %]?op=form"><i class="icon-plus"></i> New page</a> |
79 |
</div> |
80 |
[% END %] |
81 |
<pre>DEBUG: [% debug %]</pre> |
82 |
<pre>DEBUG2: data.location: [% data.location %] data.branchcode: [% data.branchcode %]</pre> |
83 |
[% IF ( form ) %] |
84 |
<form name="form" method="post" enctype="multipart/form-data" action="[% link_self %]" > |
85 |
<input type="hidden" name="op" value="[% op %]" /> |
86 |
<input type="hidden" name="id" value="[% id %]" /> |
87 |
<fieldset class="rows"> |
88 |
<legend>Page</legend> |
89 |
<ol> |
90 |
<li> |
91 |
<label for="disp">Display location</label> |
92 |
<select id="disp" name="disp"> |
93 |
<option value="" [% IF ( data.disp == "" ) %]selected="selected"[% END %]>All</option> |
94 |
<option value="1" [% IF ( data.disp == "1" ) %]selected="selected"[% END %]>Intranet</option> |
95 |
<option value="2" [% IF ( data.disp == "2" ) %]selected="selected"[% END %]>OPAC</option> |
96 |
</select> |
97 |
</li> |
98 |
<li> |
99 |
<label for="branch">Library: </label> |
100 |
<select id="branch" name="branch"> |
101 |
<option value=""[% IF ( data.branchcode == '' ) %] selected="selected"[% END %]>All libraries</option> |
102 |
[% FOREACH branch_lis IN branch_list %] |
103 |
<option value="[% branch_lis.branchcode %]"[% IF ( branch_lis.branchcode == data.branchcode ) %] selected="selected"[% END %]>[% branch_lis.branchname %]</option> |
104 |
[% END %] |
105 |
</select> |
106 |
</li> |
107 |
<li> |
108 |
<label for="lang">Language</label> |
109 |
<pre>LANG: [% lang %]</pre> |
110 |
<select id="lang" name="lang"> |
111 |
<option value="" [% IF ( data.lang == "" ) %]selected="selected"[% END %]>All</option> |
112 |
[% FOREACH lang_lis IN lang_list %] |
113 |
<option value="[% lang_lis.rfc4646_subtag %]" [% IF ( lang_lis.rfc4646_subtag == data.lang ) %]selected="selected"[% END %]>[% lang_lis.native_description %] ([% lang_lis.rfc4646_subtag %])</option> |
114 |
[% END %] |
115 |
</select> |
116 |
</li> |
117 |
<li> |
118 |
<label for="parent">Parent page: </label> |
119 |
<select id="parent" name="parent"> |
120 |
<option value="" [% IF ( data.id == "" ) %]selected="selected"[% END %]>No parent</option> |
121 |
[% FOREACH parent_lis IN parent_list %] |
122 |
<option value="[% parent_lis.id %]" [% IF ( data.parent.id == parent_lis.id ) %]selected="selected"[% END %]>[% parent_lis.title_link %]</option> |
123 |
[% END %] |
124 |
</select> |
125 |
</li> |
126 |
<li> |
127 |
<label for="title_link" class="required">Link title: </label> |
128 |
<input id="title_link" size="30" type="text" name="title_link" value="[% data.title_link %]" required="required" class="required" /> <span class="required">Required</span> |
129 |
</li> |
130 |
<li> |
131 |
<label for="title">Page title: </label> |
132 |
<input id="title" size="30" type="text" name="title" value="[% data.title %]" /> |
133 |
</li> |
134 |
<li> |
135 |
<label for="number">Appear in position: </label> |
136 |
<input id="sortorder" size="3" name="sortorder" type="text" value="[% IF ( data.sortorder ) %][% data.sortorder %][% ELSE %]0[% END %]" /> |
137 |
</li> |
138 |
<li> |
139 |
<label for="publish">Publish: </label> |
140 |
<input type="checkbox" id="publish" name="publish"[% IF ( data.publish ) %] checked="checked"[% END %]/> |
141 |
</li> |
142 |
<li><label for="new">Content: </label> |
143 |
<textarea name="content" id="content" cols="75" rows="10">[% data.content %]</textarea> |
144 |
</li> |
145 |
</ol> |
146 |
</fieldset> |
147 |
<fieldset class="action"><input class="button" type="submit" value="Save" /> <a class="cancel" href="[% link_self %]">Cancel</a></fieldset> |
148 |
</form> |
149 |
[% ELSE %] |
150 |
<div style="margin-bottom:5px;"> |
151 |
<form name="form" method="post" action="[% link_self %]" > |
152 |
<label for="disp">Display location:</label> |
153 |
<select name="disp" id="disp"> |
154 |
<option value="" [% IF ( disp == "" ) %]selected="selected"[% END %]>All</option> |
155 |
<option value="0" [% IF ( disp == "0" ) %]selected="selected"[% END %]>OPAC</option> |
156 |
<option value="1" [% IF ( disp == "1" ) %]selected="selected"[% END %]>Librarian interface</option> |
157 |
</select> |
158 |
|
159 |
<label for="branch">Library: </label> |
160 |
<select id="branch" name="branch"> |
161 |
<option value=""[% IF ( branch == "" ) %] selected="selected"[% END %]>All libraries</option> |
162 |
[% FOREACH branch_lis IN branch_list %] |
163 |
<option value="[% branch_lis.branchcode %]"[% IF ( branch_lis.branchcode == branch ) %] selected="selected"[% END %]>[% branch_lis.branchname %]</option> |
164 |
[% END %] |
165 |
</select> |
166 |
|
167 |
<label for="lang">Language:</label> |
168 |
<select name="lang" id="lang"> |
169 |
<option value="" [% IF ( lang == "" ) %]selected="selected"[% END %]>All</option> |
170 |
[% FOREACH lang_lis IN lang_list %] |
171 |
<option value="[% lang_lis.rfc4646_subtag %]" [% IF ( lang_lis.rfc4646_subtag == lang ) %]selected="selected"[% END %]>[% lang_lis.native_description %] ([% lang_lis.rfc4646_subtag %])</option> |
172 |
[% END %] |
173 |
</select> |
174 |
<input type="submit" class="button" value="Filter" /> |
175 |
</form> |
176 |
</div> |
177 |
[% IF ( page_list_count ) %] |
178 |
<form name="del_form" method="post" action="[% link_self %]" onsubmit='return confirm(MSG_CONFIRM_DELETE_PAGE)'> |
179 |
<table id="newst"> |
180 |
<thead><tr> |
181 |
<th> </th> |
182 |
<th>Pub.</th> |
183 |
<th>Parent</th> |
184 |
<th>Loc.</th> |
185 |
<th>Lib.</th> |
186 |
<th>Lang.</th> |
187 |
<th>Num.</th> |
188 |
<th>Link title</th> |
189 |
<th>Page title</th> |
190 |
<th> </th> |
191 |
<th> </th> |
192 |
</tr></thead> |
193 |
<tbody>[% FOREACH page_lis IN page_list %] |
194 |
<tr> |
195 |
<td> |
196 |
<input type="checkbox" name="ids" id="ids" value="[% page_lis.id %]" /> |
197 |
</td> |
198 |
<td>[% IF ( page_lis.publish ) %]Yes[% ELSE %]No[% END %]</td> |
199 |
<td>[% page_lis.parent.title_link %]</td> |
200 |
<td>[% SWITCH page_lis.display %] |
201 |
[% CASE "0" %] |
202 |
OPAC |
203 |
[% CASE "1" %] |
204 |
Staff interface |
205 |
[% CASE "" %] |
206 |
All |
207 |
[% END %] |
208 |
</td> |
209 |
<td>[% IF ( page_lis.branch == "" ) %] |
210 |
All |
211 |
[% ELSE %][% page_lis.branchname %] |
212 |
[% END %]</td> |
213 |
<td>[% IF ( page_lis.langcode == "" ) %]All[% ELSE %] |
214 |
[% page_lis.langcode %][% END %]</td> |
215 |
<td>[% page_lis.sortorder %]</td> |
216 |
<td><a href="[% link_self %]?op=form&id=[% page_lis.id %]">[% page_lis.title_link %]</a></td> |
217 |
<td>[% page_lis.title %]</td> |
218 |
<td><a href="[% link_self %]?op=form&id=[% page_lis.id %]">Edit</a></td> |
219 |
<td><a href="[% link_opac %]?id=[% page_lis.id %]">View</a></td> |
220 |
</tr> |
221 |
[% END %]</tbody> |
222 |
</table> |
223 |
<input type="hidden" name="op" value="del" /> |
224 |
<fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset> |
225 |
</form> |
226 |
[% ELSE %] |
227 |
<p>No pages exists</p> |
228 |
[% END %] |
229 |
[% END %] |
230 |
</div> |
231 |
</div> |
232 |
[% UNLESS ( form ) %] |
233 |
<div class="yui-b noprint"> |
234 |
[% INCLUDE 'tools-menu.inc' %] |
235 |
</div> |
236 |
[% END %] |
237 |
</div> |
238 |
[% INCLUDE 'intranet-bottom.inc' %] |