bug 8215: (followup) remove extraneous underscore in template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / course_reserves / course-details.tt
1 [% USE AuthorisedValues %]
2 [% USE ItemTypes %]
3 [% USE Branches %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Course reserves &rsaquo; New course</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7
8 <script type="text/javascript">
9 //<![CDATA[
10     $(document).ready(function(){
11         $("a.delete_item").click(function(){
12             return confirm( _("Are you sure you want to delete this item?"));
13         });
14
15         $("#delete_course").click(function(){
16             return confirm( _("Are you sure you want to delete this course?") );
17         });
18     });
19
20 //]]>
21 </script>
22
23 </head>
24
25 <body>
26
27 [% INCLUDE 'header.inc' %]
28 [% INCLUDE 'cat-search.inc' %]
29
30 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a> &rsaquo; Course details for <i>[% course.course_name %]</i></div>
31
32 <div id="doc2" class="yui-t7">
33     <div id="bd">
34         <div id="yui-main">
35             <div id="toolbar">
36                 <ul class="toolbar">
37                     [% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]">Add reserves</a></li>[% END %]
38                     [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]">Edit course</a></li>[% END %]
39                     [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="delete_course" href="/cgi-bin/koha/course_reserves/mod_course.pl?course_id=[% course.course_id %]&action=del">Delete course</a></li>[% END %]
40                 </ul>
41             </div><!-- /toolbar -->
42
43             <table>
44               <tbody>
45                 <tr><th>Course name</th><td>[% course.course_name %]</td></tr>
46                 <tr><th>Term</th><td>[% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</td></tr>
47                 <tr><th>Department</th><td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</td></tr>
48                 <tr><th>Course number</th><td>[% course.course_number %]</td></tr>
49                 <tr><th>Section</th><td>[% course.section %]</td></tr>
50                 <tr><th>Instructors</th><td>[% FOREACH i IN course.instructors %]<div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber %]">[% i.firstname %] [% i.surname %]</a></div>[% END %]</td></tr>
51                 <tr><th>Staff note</th><td>[% course.staff_note %]</td></tr>
52                 <tr><th>Public note</th><td>[% course.public_note %]</td></tr>
53                 <tr><th>Students count</th><td>[% course.students_count %]</td></tr>
54                 <tr><th>Status</th><td>[% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</td></tr>
55               </tbody>
56             </table>
57
58             [% IF course_reserves %]
59             <table>
60                 <thead>
61                     <tr>
62                         <th>Title</th>
63                         <th>Barcode</th>
64                         <th>Call number</th>
65                         [% IF item_level_itypes %]<th>Item type</th>[% END %]
66                         <th>Collection</th>
67                         <th>Location</th>
68                         <th>Library</th>
69                         <th>Staff note</th>
70                         <th>Public note</th>
71                         [% IF CAN_user_coursereserves_add_reserves %]<th>&nbsp;<!-- Edit --></th>[% END %]
72                         [% IF CAN_user_coursereserves_delete_reserves %]<th>&nbsp;<!-- Remove --></th>[% END %]
73                         <th>Other course reserves</th>
74                     </tr>
75                 </thead>
76
77                 <tbody>
78                     [% FOREACH cr IN course_reserves %]
79                         <tr>
80                             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
81                             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&biblionumber=[% cr.item.biblionumber %]&bi=[% cr.item.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
82                             <td>[% cr.item.itemcallnumber %]</td>
83                             [% IF item_level_itypes %]
84                             <td>
85                                 [% IF cr.course_item.itype %]
86                                     [% IF cr.course_item.enabled == 'yes' %]
87                                         [% ItemTypes.GetDescription( cr.item.itype ) %]
88                                     [% ELSE %]
89                                         [% ItemTypes.GetDescription( cr.course_item.itype ) %]
90                                     [% END %]
91                                 [% ELSE %]
92                                      <i>Unchanged</i>
93                                      [% IF cr.item.itype %]
94                                          ([% ItemTypes.GetDescription( cr.item.itype ) %])
95                                      [% END %]
96                                 [% END %]
97                             </td>
98                             [% END %]
99                             <td>
100                                  [% IF cr.course_item.ccode %]
101                                      [% IF cr.course_item.enabled == 'yes' %]
102                                           [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]
103                                      [% ELSE %]
104                                          [% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) %]
105                                      [% END %]
106                                  [% ELSE %]
107                                      <i>Unchanged</i>
108                                      [% IF cr.item.ccode %]
109                                          ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %])
110                                      [% END %]
111                                  [% END %]
112                             </td>
113                             <td>
114                                 [% IF cr.course_item.location %]
115                                      [% IF cr.course_item.enabled == 'yes' %]
116                                          [% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]
117                                     [% ELSE %]
118                                         [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) %]
119                                     [% END %]
120                                 [% ELSE %]
121                                     <i>Unchanged</i>
122                                     [% IF cr.item.location %]
123                                         ([% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %])
124                                     [% END %]
125                                 [% END %]
126                             </td>
127                             <td>
128                                 [% IF cr.course_item.holdingbranch %]
129                                     [% IF cr.course_item.enabled == 'yes' %]
130                                         [% Branches.GetName( cr.item.holdingbranch ) %]
131                                     [% ELSE %]
132                                         [% Branches.GetName( cr.course_item.holdingbranch ) %]
133                                     [% END %]
134                                 [% ELSE %]
135                                     <i>Unchanged</i>
136                                     [% IF cr.item.holdingbranch %]
137                                         ([% Branches.GetName( cr.item.holdingbranch ) %])
138                                     [% END %]
139                                 [% END %]
140                             </td>
141                             <td>[% cr.staff_note %]</td>
142                             <td>[% cr.public_note %]</td>
143
144                             [% IF CAN_user_coursereserves_add_reserves %]
145                                 <td><a href="add_items.pl?course_id=[% course.course_id %]&barcode=[% cr.item.barcode %]&action=lookup">Edit</a></td>
146                             [% END %]
147
148                             [% IF CAN_user_coursereserves_delete_reserves %]
149                                 <td>
150                                     [% IF cr.item.onloan %]
151                                         On Loan
152                                     [% ELSIF cr.item.itemlost %]
153                                         Item Lost
154                                     [% ELSE %]
155                                         <a href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" class="delete_item" >Remove</a>
156                                     [% END %]
157
158                                 </td>
159                             [% END %]
160
161                             <td>
162                                 [% FOREACH course IN cr.courses %]
163                                     [% UNLESS cr.course_id == course.course_id %]
164                                         <p>
165                                             <a href="course-details.pl?course_id=[% course.course_id %]">
166                                                 [% course.course_name %]
167                                                 [% IF course.section %] [% course.section %] [% END %]
168                                                 [% IF course.term %] [% AuthorisedValues.GetByCode( 'TERM', course.term ) %] [% END %]
169                                             </a>
170                                         </p>
171                                     [% END %]
172                                 [% END %]
173                             </td>
174                         </tr>
175                     [% END %]
176                 </tbody>
177             </table>
178             [% END %]
179         </div>
180     </div>
181 </div>
182
183
184 [% INCLUDE 'intranet-bottom.inc' %]