Beginning work on Calendar compatibility fixes
[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">Language</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"><!-- TMPL_VAR name="language" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="language" -->"><!-- 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" value="<!-- TMPL_VAR NAME="expirationdate" -->" />
69                 <script type="text/javascript">
70                     Calendar.setup(
71                     {
72                         inputField : "expirationdate",
73                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
74                     }
75                     );
76                 </script>
77             </li>
78             <li>
79                 <label for="number">Appear in position </label>
80                 <!-- TMPL_IF NAME="number"-->
81                     <input id="number" size="3" name="number" type="text" checked="checked" value="<!-- TMPL_VAR NAME="number"  -->" />
82                 <!-- TMPL_ELSE -->
83                     <input id="number" size="3" name="number" type="text" />
84                 <!-- /TMPL_IF -->
85             </li>
86             <li><label for="new">News</label>
87             <textarea name="new" id="new"  cols="75" rows="10"><!-- TMPL_VAR NAME="new" --></textarea></li>
88             </ol>
89                         </fieldset>
90   
91                 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
92         </form>
93     <!-- TMPL_ELSE -->
94         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
95             <label for="lang">Display Location:</label>
96             <select name="lang" id="lang">
97             <option value="">All</option>
98             <option value="koha">Librarian interface</option>
99                 <!-- TMPL_LOOP name="lang_list" -->
100                     <!-- TMPL_IF name="selected" -->
101                         <option value="<!-- TMPL_VAR name="language" -->" selected="selected">
102                     <!-- TMPL_ELSE -->
103                         <option value="<!-- TMPL_VAR name="language" -->">
104                     <!-- /TMPL_IF -->
105                         <!-- TMPL_VAR name="language" -->
106                     </option>
107                 <!-- /TMPL_LOOP -->
108             </select>
109             <input type="submit" class="button" value="Filter" />
110             </form>
111         <!-- TMPL_IF NAME="opac_news_count" -->
112         <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?')">
113                 <table id="newst">
114                    <thead> <tr>
115                         <th>&nbsp;</th>
116                         <th>Language</th>
117                         <th>Number</th>
118                         <th>Creation Date</th>
119                         <th>Expiration Date</th>
120                         <th>Title</th>
121                         <th>News</th>
122                         <th>&nbsp;</th>
123                     </tr></thead>
124                     <tbody><!-- TMPL_LOOP NAME="opac_news" -->
125                          <!-- TMPL_IF NAME="expired" -->
126                             <tr class="expired">
127                             <!-- TMPL_ELSE -->
128                             <tr>
129                             <!-- /TMPL_IF -->
130                             <td>
131                                 <input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->" />
132                             </td>
133                             <td><!-- TMPL_VAR NAME="lang" --></td>
134                             <td><!-- TMPL_VAR NAME="number" --></td>
135                             <td><!-- TMPL_VAR NAME="newdate" --></td>
136                             <td><!-- TMPL_VAR NAME="expirationdate" --> <!-- TMPL_IF NAME="expired" -->(<span class="expired">expired</span>)<!-- /TMPL_IF --></td>
137                             <td><!-- TMPL_VAR NAME="title" --></td>
138                            <td>
139                                 <!-- TMPL_VAR NAME="new" -->
140                             </td>
141                             <td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a></td>
142                         </tr>
143                     <!-- /TMPL_LOOP --></tbody>
144                 </table>
145                 <input type="hidden" name="op" value="del" />
146                 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
147             </form>
148         <!-- TMPL_ELSE -->
149             <p>No news loaded</p>
150         <!-- /TMPL_IF -->
151     <!-- /TMPL_IF -->
152 </div>
153 </div>
154 <!-- TMPL_UNLESS NAME="add_form" -->
155     <div class="yui-b noprint">
156         <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
157     </div>
158 <!-- /TMPL_UNLESS -->
159 </div>
160 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->