fixing buggy url in cancel button
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / tools / koha-news.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; News Management</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <!-- Additions to enable Calendar system -->
6 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
7 <!-- End of additions --><!-- Additions to enable Calendar system -->
8 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
9 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
10 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
11 <!-- End of additions -->
12
13 <!-- TMPL_INCLUDE NAME="menus.inc" -->
14 <!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
15
16 <div id="koha-news_main" class="searchresults">
17     <h1> OPAC & KOHA News</h1>
18     <!-- TMPL_IF name="add_form" -->
19         <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
20             <input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
21             <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
22             <p>
23             <label for="lang">Language</label>
24             <select id="lang" name="lang">
25                 <option value="koha">Librarian interface</option>
26                 <!-- TMPL_LOOP name="lang_list" -->
27                     <!-- TMPL_IF name="selected" -->
28                         <option value="<!-- TMPL_VAR name="language" -->" selected>
29                     <!-- TMPL_ELSE -->
30                         <option value="<!-- TMPL_VAR name="language" -->">
31                     <!-- /TMPL_IF -->
32                         <!-- TMPL_VAR name="language" -->
33                     </option>
34                 <!-- /TMPL_LOOP" -->
35             </select>
36             </p>
37             <p>
38                 <label for="title">Title</label>
39                 <input id="title" size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
40             </p>
41             <p>
42                 <label for="expirationdate">Expiration date</label>
43                 <input id="expirationdate" type="text" name="expirationdate" value="<!-- TMPL_VAR NAME="expirationdate" -->"/>
44                 <script type="text/javascript">
45                     Calendar.setup(
46                     {
47                         inputField : "expirationdate",
48                         ifFormat : "%Y-%m-%d",
49                     }
50                     );
51                 </script>
52             </p>
53             <p>
54                 <label for="number">Appear in position </label>
55                 <!-- TMPL_IF NAME="number"-->
56                     <input id="number" size="3" name="number" type="text" checked="1" />
57                 <!-- TMPL_ELSE -->
58                     <input id="number" size="3" name="number" type="text" />
59                 <!-- /TMPL_IF -->
60             </p>
61             <p>News</p>
62             <textarea name="new" cols="75" rows="10"><!-- TMPL_VAR NAME="new" --></textarea>
63             <p>
64                 <input class="button" type="submit" value="Save" />
65                 <input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/tools/koha-news.pl'" />
66             </p>
67         </form>
68     <!-- TMPL_ELSE -->
69         <div id="koha-news_filter">
70             <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" />
71             <label>Language</label>
72             <select name="lang">
73             <option value="">All</option>
74             <option value="koha">Librarian interface</option>
75                 <!-- TMPL_LOOP name="lang_list" -->
76                     <!-- TMPL_IF name="selected" -->
77                         <option value="<!-- TMPL_VAR name="language" -->" selected />
78                     <!-- TMPL_ELSE -->
79                         <option value="<!-- TMPL_VAR name="language" -->" />
80                     <!-- /TMPL_IF -->
81                         <!-- TMPL_VAR name="language" -->
82                     </option>
83                 <!-- /TMPL_LOOP" -->
84             </select>
85             <input type="submit" class="button" value="Filter">
86             </form>
87         </div>
88         <!-- TMPL_IF NAME="opac_news_count" -->
89         <div id="koha-news_list">
90             <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?')">
91                 <table>
92                     <tr>
93                         <th></th>
94                         <th>Language</th>
95                         <th>Number</th>
96                         <th>Creation Date</th>
97                         <th>Expiration Date</th>
98                         <th>Title</th>
99                         <th>News</th>
100                         <th></th>
101                     </tr>
102                     <!-- TMPL_LOOP NAME="opac_news" -->
103                         <tr>
104                             <td>
105                                 <input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->" />
106                             </td>
107                             <td><!-- TMPL_VAR NAME="lang" --></td>
108                             <td><!-- TMPL_VAR NAME="number" --></td>
109                             <td><!-- TMPL_VAR NAME="newdate" --></td>
110                             <td><!-- TMPL_VAR NAME="expirationdate" --></td>
111                             <td><!-- TMPL_VAR NAME="title" --></td>
112                             <!-- TMPL_IF NAME="hasexpirated" -->
113                             <td class="hasexpirated">
114                             <!-- TMPL_ELSE -->
115                             <td>
116                             <!-- /TMPL_IF -->
117                                 <!-- TMPL_VAR NAME="new" -->
118                             </td>
119                             <td>
120                                 <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=<!-- TMPL_VAR NAME="idnew" -->">
121                                     Edit
122                                 </a>
123                             </td>
124                         </tr>
125                     <!-- /TMPL_LOOP -->
126                 </table>
127                 <input type="hidden" name="op" value="del" />
128                 <input type="submit" class="button" value="Delete selected" />
129             </form>
130         <!-- TMPL_ELSE -->
131             <p>No news loaded</p>
132         <!-- /TMPL_IF -->
133         <div id="action">
134           <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">Add news</a>
135         </div>
136     </div>
137     <!-- /TMPL_IF -->
138 </div>
139
140 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->