Merge remote branch 'kc/new/enh/bug_5548' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / koha-news.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Tools &rsaquo; News</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/javascript">//<![CDATA[
7 $(document).ready(function() {
8         $("#newst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
9                 dateFormat: 'uk',<!-- /TMPL_IF -->
10                 sortList: [[2,0]],
11                 headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }}
12         }); 
13 }); 
14 //]]>
15 </script>
16 <script language="javascript" type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
17 <script language="javascript" type="text/javascript">
18 tinyMCE.init({
19     mode : "textareas",
20         theme : "advanced",
21     plugins : "table,save,advhr,advlink,iespell,searchreplace,print,contextmenu",
22         theme_advanced_disable : "underline,strikethrough,styleselect,image",
23     theme_advanced_buttons1_add_before : "save,separator",
24     theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
25     theme_advanced_buttons3_add_before : "tablecontrols,separator",
26     theme_advanced_buttons3_add : "iespell,advhr,separator,print",
27     theme_advanced_toolbar_location : "top",
28     theme_advanced_toolbar_align : "left",
29     theme_advanced_path_location : "bottom",
30     plugin_insertdate_dateFormat : "%Y-%m-%d",
31     plugin_insertdate_timeFormat : "%H:%M:%S",
32     apply_source_formatting : true
33 });
34 </script>
35 </head>
36 <body>
37 <!-- TMPL_INCLUDE NAME="header.inc" -->
38 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
39
40 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <!-- TMPL_IF NAME="add_form" --><a href="/cgi-bin/koha/tools/koha-news.pl">News</a> &rsaquo; <!-- TMPL_IF NAME="id" -->
41 Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->News<!-- /TMPL_IF --></div>
42
43 <!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
44    <div id="bd">
45         <div id="yui-main">
46         <div class="yui-b">
47  
48 <!-- TMPL_UNLESS NAME="add_form" -->
49 <div id="toolbar">
50         <script type="text/javascript">
51         //<![CDATA[
52         // prepare DOM for YUI Toolbar
53          $(document).ready(function() {
54             yuiToolbar();
55          });
56         // YUI Toolbar Functions
57         function yuiToolbar() {
58             new YAHOO.widget.Button("newentry");
59         }
60         //]]>
61         </script>
62         <ul class="toolbar">
63         <li><a id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New Entry</a></li>
64 </ul></div>
65 <!-- /TMPL_UNLESS -->
66
67 <!-- TMPL_IF name="add_form" -->
68         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
69             <input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
70             <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
71                         <fieldset class="rows">
72                         <legend>OPAC and Koha News</legend>
73            <ol> <li>
74             <label for="lang">Display Location</label>
75             <select id="lang" name="lang">
76                 <option value="koha">Librarian interface</option>
77                 <!-- TMPL_IF NAME="slip" --><option value="slip" selected="selected">Slip</option><!-- TMPL_ELSE --><option value="slip">Slip</option><!-- /TMPL_IF -->
78                 <!-- TMPL_LOOP name="lang_list" -->
79                     <!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR name="language" -->" selected="selected">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="language" -->">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- /TMPL_IF -->
80                 <!-- /TMPL_LOOP -->
81             </select>
82             </li>
83             <li>
84                 <label for="title">Title</label>
85                 <input id="title" size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
86             </li>
87             <li>
88                 <label for="timestamp">Publication date</label>
89                 <input id="timestamp" type="text" name="timestamp" size="15" value="<!-- TMPL_VAR NAME="timestamp" -->" />
90                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="timestampButton" style="cursor: pointer;" />
91                 <script type="text/javascript">
92                     Calendar.setup(
93                     {
94                         button : "timestampButton",
95                         inputField : "timestamp",
96                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->"
97                     }
98                     );
99                 </script>
100                                 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
101             </li>
102             <li>
103                 <label for="expirationdate">Expiration date</label>
104                 <input id="expirationdate" type="text" name="expirationdate" size="15" value="<!-- TMPL_VAR NAME="expirationdate" -->" />
105                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendar" style="cursor: pointer;" />
106                 <script type="text/javascript">
107                     Calendar.setup(
108                     {
109                         button : "openCalendar",
110                         inputField : "expirationdate",
111                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->"
112                     }
113                     );
114                 </script>
115                                 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
116             </li>
117             <li>
118                 <label for="number">Appear in position </label>
119                 <!-- TMPL_IF NAME="number"-->
120                     <input id="number" size="3" name="number" type="text" checked="checked" value="<!-- TMPL_VAR NAME="number"  -->" />
121                 <!-- TMPL_ELSE -->
122                     <input id="number" size="3" name="number" type="text" />
123                 <!-- /TMPL_IF -->
124             </li>
125             <li><label for="new">News</label>
126             <textarea name="new" id="new"  cols="75" rows="10"><!-- TMPL_VAR NAME="new" --></textarea></li>
127             </ol>
128                         </fieldset>
129   
130                 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
131         </form>
132     <!-- TMPL_ELSE -->
133         <div style="margin-bottom:5px;">
134         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
135             <label for="lang">Display Location:</label>
136             <select name="lang" id="lang">
137             <option value="">All</option>
138             <option value="koha">Librarian interface</option>
139             <option value="slip">Slip</option>
140                 <!-- TMPL_LOOP name="lang_list" -->
141                     <!-- TMPL_IF name="selected" -->
142                         <option value="<!-- TMPL_VAR name="language" -->" selected="selected">
143                     <!-- TMPL_ELSE -->
144                         <option value="<!-- TMPL_VAR name="language" -->">
145                     <!-- /TMPL_IF -->
146                         OPAC (<!-- TMPL_VAR name="language" -->)
147                     </option>
148                 <!-- /TMPL_LOOP -->
149             </select>
150             <input type="submit" class="button" value="Filter" />
151         </form>
152         </div>
153         <!-- TMPL_IF NAME="opac_news_count" -->
154         <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('Are you sure you want to delete the selected news?')">
155                 <table id="newst">
156                    <thead> <tr>
157                         <th>&nbsp;</th>
158                         <th>Location</th>
159                         <th>Number</th>
160                         <th>Creation&nbsp;Date</th>
161                         <th>Expiration&nbsp;Date</th>
162                         <th>Title</th>
163                         <th>News</th>
164                         <th>&nbsp;</th>
165                     </tr></thead>
166                     <tbody><!-- TMPL_LOOP NAME="opac_news" -->
167                          <!-- TMPL_IF NAME="expired" -->
168                             <tr class="expired">
169                             <!-- TMPL_ELSE -->
170                             <tr>
171                             <!-- /TMPL_IF -->
172                             <td>
173                                 <input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->" />
174                             </td>
175                             <td><!-- TMPL_IF EXPR="lang eq 'koha'" -->
176                                     Librarian interface
177                                  <!-- TMPL_ELSE -->
178                                     <!-- TMPL_IF EXPR="lang eq 'slip'" -->
179                                         Slip
180                                     <!-- TMPL_ELSE -->
181                                         OPAC
182                                     <!-- /TMPL_IF -->
183                                  <!-- /TMPL_IF -->
184                              </td>
185
186                             <td><!-- TMPL_VAR NAME="number" --></td>
187                             <td><!-- TMPL_VAR NAME="newdate" --></td>
188                             <td><!-- TMPL_VAR NAME="expirationdate" --> <!-- TMPL_IF NAME="expired" -->(<span class="expired">expired</span>)<!-- /TMPL_IF --></td>
189                             <td><!-- TMPL_VAR NAME="title" --></td>
190                            <td>
191                                 <!-- TMPL_VAR NAME="new" -->
192                             </td>
193                             <td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a></td>
194                         </tr>
195                     <!-- /TMPL_LOOP --></tbody>
196                 </table>
197                 <input type="hidden" name="op" value="del" />
198                 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
199             </form>
200         <!-- TMPL_ELSE -->
201             <p>No news loaded</p>
202         <!-- /TMPL_IF -->
203     <!-- /TMPL_IF -->
204 </div>
205 </div>
206 <!-- TMPL_UNLESS NAME="add_form" -->
207     <div class="yui-b noprint">
208         <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
209     </div>
210 <!-- /TMPL_UNLESS -->
211 </div>
212 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->