Minor markup tweak and correction
[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 </head>
17 <body>
18 <!-- TMPL_INCLUDE NAME="header.inc" -->
19 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
20
21 <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" -->
22 Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->News<!-- /TMPL_IF --></div>
23
24 <!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
25    <div id="bd">
26         <div id="yui-main">
27         <div class="yui-b">
28  
29 <!-- TMPL_UNLESS NAME="add_form" -->
30 <div id="toolbar">
31         <script type="text/javascript">
32         //<![CDATA[
33         // prepare DOM for YUI Toolbar
34          $(document).ready(function() {
35             yuiToolbar();
36          });
37         // YUI Toolbar Functions
38         function yuiToolbar() {
39             new YAHOO.widget.Button("newentry");
40         }
41         //]]>
42         </script>
43         <ul class="toolbar">
44         <li><a id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New Entry</a></li>
45 </ul></div>
46 <!-- /TMPL_UNLESS -->
47
48 <!-- TMPL_IF name="add_form" -->
49         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
50             <input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
51             <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
52                         <fieldset class="rows">
53                         <legend>OPAC and Koha News</legend>
54            <ol> <li>
55             <label for="lang">Display Location</label>
56             <select id="lang" name="lang">
57                 <option value="koha">Librarian interface</option>
58                 <!-- TMPL_LOOP name="lang_list" -->
59                     <!-- 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 -->
60                 <!-- /TMPL_LOOP -->
61             </select>
62             </li>
63             <li>
64                 <label for="title">Title</label>
65                 <input id="title" size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
66             </li>
67             <li>
68                 <label for="timestamp">Publication date</label>
69                 <input id="timestamp" type="text" name="timestamp" size="15" value="<!-- TMPL_VAR NAME="timestamp" -->" />
70                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="timestampButton" style="cursor: pointer;" />
71                 <script type="text/javascript">
72                     Calendar.setup(
73                     {
74                         button : "timestampButton",
75                         inputField : "timestamp",
76                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
77                     }
78                     );
79                 </script>
80             </li>
81             <li>
82                 <label for="expirationdate">Expiration date</label>
83                 <input id="expirationdate" type="text" name="expirationdate" size="15" value="<!-- TMPL_VAR NAME="expirationdate" -->" />
84                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendar" style="cursor: pointer;" />
85                 <script type="text/javascript">
86                     Calendar.setup(
87                     {
88                         button : "openCalendar",
89                         inputField : "expirationdate",
90                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
91                     }
92                     );
93                 </script>
94             </li>
95             <li>
96                 <label for="number">Appear in position </label>
97                 <!-- TMPL_IF NAME="number"-->
98                     <input id="number" size="3" name="number" type="text" checked="checked" value="<!-- TMPL_VAR NAME="number"  -->" />
99                 <!-- TMPL_ELSE -->
100                     <input id="number" size="3" name="number" type="text" />
101                 <!-- /TMPL_IF -->
102             </li>
103             <li><label for="new">News</label>
104             <textarea name="new" id="new"  cols="75" rows="10"><!-- TMPL_VAR NAME="new" --></textarea></li>
105             </ol>
106                         </fieldset>
107   
108                 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
109         </form>
110     <!-- TMPL_ELSE -->
111         <div style="margin-bottom:5px;">
112         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
113             <label for="lang">Display Location:</label>
114             <select name="lang" id="lang">
115             <option value="">All</option>
116             <option value="koha">Librarian interface</option>
117                 <!-- TMPL_LOOP name="lang_list" -->
118                     <!-- TMPL_IF name="selected" -->
119                         <option value="<!-- TMPL_VAR name="language" -->" selected="selected">
120                     <!-- TMPL_ELSE -->
121                         <option value="<!-- TMPL_VAR name="language" -->">
122                     <!-- /TMPL_IF -->
123                         OPAC (<!-- TMPL_VAR name="language" -->)
124                     </option>
125                 <!-- /TMPL_LOOP -->
126             </select>
127             <input type="submit" class="button" value="Filter" />
128         </form>
129         </div>
130         <!-- TMPL_IF NAME="opac_news_count" -->
131         <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?')">
132                 <table id="newst">
133                    <thead> <tr>
134                         <th>&nbsp;</th>
135                         <th>Location</th>
136                         <th>Number</th>
137                         <th>Creation&nbsp;Date</th>
138                         <th>Expiration&nbsp;Date</th>
139                         <th>Title</th>
140                         <th>News</th>
141                         <th>&nbsp;</th>
142                     </tr></thead>
143                     <tbody><!-- TMPL_LOOP NAME="opac_news" -->
144                          <!-- TMPL_IF NAME="expired" -->
145                             <tr class="expired">
146                             <!-- TMPL_ELSE -->
147                             <tr>
148                             <!-- /TMPL_IF -->
149                             <td>
150                                 <input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->" />
151                             </td>
152                             <td><!-- TMPL_IF EXPR="lang eq 'koha'" -->Librarian interface<!-- TMPL_ELSE -->OPAC (<!-- TMPL_VAR NAME="lang" -->)<!-- /TMPL_IF --></td>
153                             <td><!-- TMPL_VAR NAME="number" --></td>
154                             <td><!-- TMPL_VAR NAME="newdate" --></td>
155                             <td><!-- TMPL_VAR NAME="expirationdate" --> <!-- TMPL_IF NAME="expired" -->(<span class="expired">expired</span>)<!-- /TMPL_IF --></td>
156                             <td><!-- TMPL_VAR NAME="title" --></td>
157                            <td>
158                                 <!-- TMPL_VAR NAME="new" -->
159                             </td>
160                             <td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a></td>
161                         </tr>
162                     <!-- /TMPL_LOOP --></tbody>
163                 </table>
164                 <input type="hidden" name="op" value="del" />
165                 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
166             </form>
167         <!-- TMPL_ELSE -->
168             <p>No news loaded</p>
169         <!-- /TMPL_IF -->
170     <!-- /TMPL_IF -->
171 </div>
172 </div>
173 <!-- TMPL_UNLESS NAME="add_form" -->
174     <div class="yui-b noprint">
175         <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
176     </div>
177 <!-- /TMPL_UNLESS -->
178 </div>
179 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->