Bug 17417 [Revised] Correct invalid markup around news on the staff client home page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / intranet-main.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha staff client</title>
4 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/mainpage.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <style type="text/css"> </style>
7 <script type="text/javascript">
8 //<![CDATA[
9 var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
10     $(document).ready(function(){
11         $(".news_delete").on("click", function(){
12             return confirmDelete(MSG_CONFIRM_DELETE);
13         });
14     });
15 //]]>
16 </script>
17 </head>
18 <body id="main_intranet-main" class="main">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'home-search.inc' %]
21
22 <div id="breadcrumbs" >Home</div>
23
24
25 <div id="doc3" class="yui-t3">
26    <div id="bd" role="main">
27     <div id="yui-main">
28     <div class="yui-b"><div class="yui-g">
29     [% IF adminWarning %]
30         <div id="adminwarning" class="dialog alert">
31             <p><strong>Warning:</strong> You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
32             <p>Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
33 <p><a class="btn btn-small" href="/cgi-bin/koha/members/members-home.pl"><i class="fa fa-plus"> </i> Create patron</a></p>
34         </div>
35     [% END %]
36     <div class="yui-u first">
37
38             <div id="area-list-left">
39                 <ul class="biglinks-list">
40                     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
41                     <li>
42                         <a class="icon_general icon_circulation" href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
43                     </li>
44                     [% END %]
45
46                     [% IF ( CAN_user_borrowers ) %]
47                     <li>
48                         <a class="icon_general icon_patrons" href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
49                     </li>
50                     [% END %]
51
52                     [% IF ( CAN_user_catalogue ) %]
53                     <li>
54                         <a class="icon_general icon_search" href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a>
55                     </li>
56                     [% END %]
57
58                     <li>
59                         <a class="icon_general icon_lists" href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
60                     </li>
61
62                     [% IF ( UseCourseReserves ) %]
63                         <li>
64                             <a class="icon_general icon_course_reserves" href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
65                         </li>
66                     [% END %]
67
68                     [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
69                     <li>
70                         <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
71                     </li>
72                     [% END %]
73                     <li>
74                         <a class="icon_general icon_authorities" href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
75                     </li>
76                 </ul>
77             </div><!-- /area-list-left -->
78         </div><!-- /yui-u first -->
79     <div class="yui-u">
80             <div id="area-list-right">
81                 <ul class="biglinks-list">
82                     [% IF ( CAN_user_serials ) %]
83                     <li>
84                         <a class="icon_general icon_serials" href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
85                         <span class="biglink"></span>
86                     </li>
87                     [% END %]
88
89                     [% IF ( CAN_user_acquisition ) %]
90                     <li>
91                         <a class="icon_general icon_acquisitions" href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
92                         <span class="biglink"></span>
93                     </li>
94                     [% END %]
95
96                     [% IF ( CAN_user_reports ) %]
97                     <li>
98                         <a class="icon_general icon_reports" href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
99                     </li>
100                     [% END %]
101
102
103                     [% IF ( CAN_user_tools ) %]
104                     <li>
105                         <a class="icon_general icon_tools" href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
106                     </li>
107                     [% END %]
108
109                     [% IF ( CAN_user_parameters ) %]
110                     <li>
111                         <a class="icon_general icon_administration" href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a>
112                     </li>
113                     [% END %]
114                     <li>
115                         <a class="icon_general icon_koha" href="/cgi-bin/koha/about.pl">About Koha</a>
116                     </li>
117                 </ul>
118             </div><!-- /area-list-right -->
119         </div><!-- /yui-u -->
120 </div><!-- /yui-g -->
121 <div class="yui-g">
122             [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
123                     || ( CAN_user_tools_moderate_tags && pendingtags )
124                     || ( CAN_user_borrowers && pending_borrower_modifications )
125                     || ( CAN_user_acquisition && pendingsuggestions )
126                     || ( CAN_user_borrowers && pending_discharge_requests )
127                     || pending_article_requests
128             ) %]
129                 <div id="area-pending">
130                     [% IF pending_article_requests %]
131                     <div class="pending-info" id="article_requests_pending">
132
133                         <a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a>:
134                         <span class="pending-number-link">[% pending_article_requests %]</span>
135                     </div>
136                     [% END %]
137
138                     [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
139                     <div class="pending-info" id="suggestions_pending">
140
141                         <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Suggestions pending approval</a>:
142                         <span class="pending-number-link">[% pendingsuggestions %]</span>
143                     </div>
144                     [% END %]
145
146                     [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) %]
147                     <div class="pending-info" id="comments_pending">
148                         <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
149                         <span class="pending-number-link">[% pendingcomments %]</span>
150                     </div>
151                     [% END %]
152
153                     [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]
154                     <div class="pending-info" id="tags_pending">
155                         <a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>:
156                         <span class="pending-number-link">[% pendingtags %]</span>
157                     </div>
158                     [% END %]
159
160
161                     [% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
162                     <div class="pending-info" id="patron_updates_pending">
163                         <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
164                         <span class="pending-number-link">[% pending_borrower_modifications %]</span>
165                     </div>
166                     [% END %]
167
168                     [% IF CAN_user_borrowers && pending_discharge_requests %]
169                     <div class="pending-info" id="patron_discharges_pending">
170                         <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
171                         <span class="pending-number-link">[% pending_discharge_requests %]</span>
172                     </div>
173                     [% END %]
174
175                 </div>
176
177             [% END %]
178
179 </div>
180             [% IF ( IntranetmainUserblock ) %]
181                 <div class="yui-g" id="area-userblock">
182                     <div class="user-info">
183                         [% IntranetmainUserblock %]
184                     </div>
185                 </div>
186             [% END %]
187 </div>
188     </div>
189     <div class="yui-b"><!-- YOUR NAVIGATION GOES HERE -->
190     [% IF ( koha_news_count ) %]
191         <div id="area-news">
192             <h3><span class="news_title">News</span></h3>
193             [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
194             [% FOREACH koha_new IN koha_news %]
195                 <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
196                     <div class="newsbody">[% koha_new.new %]</div>
197                     <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
198                         [% IF ( CAN_user_tools ) %]
199                             <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
200                              | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]">Delete</a>
201                              | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
202                         [% END %]
203                     </p>
204                 </div>
205             [% END %]
206         </div><!-- /koha-news -->
207     [% END %]
208     </div>
209 </div>
210
211 <!-- the main div is closed in intranet-bottom.inc -->
212 [% INCLUDE 'intranet-bottom.inc' %]