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