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