View | Details | Raw Unified | Return to bug 8215
Collapse All | Expand All

(-)a/course_reserves/add_items.pl (-3 / +6 lines)
Lines 51-66 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
51
        flagsrequired   => { coursereserves => 'add_reserves' },
51
        flagsrequired   => { coursereserves => 'add_reserves' },
52
    }
52
    }
53
);
53
);
54
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode ) unless ( $barcode && $item && $action eq 'lookup' );
54
$template->param( ERROR_BARCODE_NOT_FOUND => $barcode )
55
  unless ( $barcode && $item && $action eq 'lookup' );
55
56
56
$template->param( course => GetCourse($course_id) );
57
$template->param( course => GetCourse($course_id) );
57
58
58
if ( $action eq 'lookup' ) {
59
if ( $action eq 'lookup' ) {
59
    my $course_item = GetCourseItem( itemnumber => $item->{'itemnumber'} );
60
    my $course_item = GetCourseItem( itemnumber => $item->{'itemnumber'} );
60
    my $course_reserve = GetCourseReserve(
61
    my $course_reserve = ($course_item)
62
      ? GetCourseReserve(
61
        course_id => $course_id,
63
        course_id => $course_id,
62
        ci_id     => $course_item->{'ci_id'}
64
        ci_id     => $course_item->{'ci_id'}
63
    ) if ($course_item);
65
      )
66
      : undef;
64
67
65
    $template->param(
68
    $template->param(
66
        item           => $item,
69
        item           => $item,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-2 / +17 lines)
Lines 2-8 Link Here
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Course reserves</title>
3
<title>Koha &rsaquo; Course reserves</title>
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5
6
<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
7
<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8
[% INCLUDE 'datatables-strings.inc' %]
9
<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
10
<script type="text/javascript" id="js">$(document).ready(function() {
11
 $(document).ready(function() {
12
    $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
13
        "sPaginationType": "four_button",
14
    }));
15
 });
16
});
17
</script>
18
6
</head>
19
</head>
7
<body id="lists_shelves" class="lists">
20
<body id="lists_shelves" class="lists">
8
21
Lines 32-37 Link Here
32
                        </ul>
45
                        </ul>
33
                    </div><!-- /toolbar -->
46
                    </div><!-- /toolbar -->
34
47
48
                    <!--
35
                    <div id="search-toolbar">
49
                    <div id="search-toolbar">
36
                        <script type="text/javascript">
50
                        <script type="text/javascript">
37
                        //<![CDATA[
51
                        //<![CDATA[
Lines 49-55 Link Here
49
                            <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
63
                            <li><form id="search_courses_form"><input type="text" name="search_on" id="search_on"></form></li>
50
                            <li><a id="search_courses">Search Courses</a></li>
64
                            <li><a id="search_courses">Search Courses</a></li>
51
                        </ul>
65
                        </ul>
52
                    </div><!-- /toolbar -->
66
                    </div>
67
                    -->
53
68
54
                    <h1>Courses</h1>
69
                    <h1>Courses</h1>
55
                    <table id="course_reserves_table">
70
                    <table id="course_reserves_table">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt (-21 / +28 lines)
Lines 90-106 function RemoveInstructor( cardnumber ) { Link Here
90
                                <ol>
90
                                <ol>
91
                                    <li>
91
                                    <li>
92
                                        <label class="required" for="department">Department:</label>
92
                                        <label class="required" for="department">Department:</label>
93
                                        <select id="department" name="department">
93
                                        [% IF departments %]
94
                                            <option value="">Select A Department</option>
94
                                            <select id="department" name="department">
95
95
                                                <option value="">Select A Department</option>
96
                                            [% FOREACH d IN departments %]
96
97
                                                [% IF d.authorised_value == department %]
97
                                                [% FOREACH d IN departments %]
98
                                                    <option value="[% d.authorised_value %]" selected="selected">[% d.lib %]</option>
98
                                                    [% IF d.authorised_value == department %]
99
                                                [% ELSE %]
99
                                                        <option value="[% d.authorised_value %]" selected="selected">[% d.lib %]</option>
100
                                                    <option value="[% d.authorised_value %]">[% d.lib %]</option>
100
                                                    [% ELSE %]
101
                                                        <option value="[% d.authorised_value %]">[% d.lib %]</option>
102
                                                    [% END %]
101
                                                [% END %]
103
                                                [% END %]
102
                                            [% END %]
104
                                            </select>
103
                                        </select>
105
                                        [% ELSE %]
106
                                            <span id="department">No DEPARTMENT authorised values found! Please create one or more authorised values with the category DEPARTMENT.</span>
107
                                        [% END %]
104
                                    </li>
108
                                    </li>
105
109
106
                                    <li>
110
                                    <li>
Lines 120-136 function RemoveInstructor( cardnumber ) { Link Here
120
124
121
                                    <li>
125
                                    <li>
122
                                        <label for="term">Term:</label>
126
                                        <label for="term">Term:</label>
123
                                        <select id="term" name="term">
127
                                        [% IF terms %]
124
                                            <option value=""></option>
128
                                            <select id="term" name="term">
125
129
                                                <option value=""></option>
126
                                            [% FOREACH t IN terms %]
130
127
                                                [% IF t.authorised_value == term %]
131
                                                [% FOREACH t IN terms %]
128
                                                    <option value="[% t.authorised_value %]" selected="selected">[% t.lib %]</option>
132
                                                    [% IF t.authorised_value == term %]
129
                                                [% ELSE %]
133
                                                        <option value="[% t.authorised_value %]" selected="selected">[% t.lib %]</option>
130
                                                    <option value="[% t.authorised_value %]">[% t.lib %]</option>
134
                                                    [% ELSE %]
135
                                                        <option value="[% t.authorised_value %]">[% t.lib %]</option>
136
                                                    [% END %]
131
                                                [% END %]
137
                                                [% END %]
132
                                            [% END %]
138
                                            </select>
133
                                        </select>
139
                                        [% ELSE %]
140
                                            <span id="term">No TERM authorised values found! Please create one or more authorised values with the category TERM.</span>
141
                                        [% END %]
134
                                    </li>
142
                                    </li>
135
143
136
                                    <!-- TODO: Add Instructors -->
144
                                    <!-- TODO: Add Instructors -->
137
- 

Return to bug 8215