-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsectionGroupDetails.html
More file actions
137 lines (131 loc) · 6.13 KB
/
Copy pathsectionGroupDetails.html
File metadata and controls
137 lines (131 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<div class="panel panel-primary panel-highlight">
<div class="panel-heading">
<div class="panel-title">
<h4>
{{ view.state.courses.list[view.selectedEntity.courseId].subjectCode }} {{ view.state.courses.list[view.selectedEntity.courseId].courseNumber
}}
<br>
<small>{{ view.selectedEntity.termCode.getTermCodeDisplayName() }}</small>
</h4>
</div>
<div class="panel-options">
<a ng-click="closeDetails()"><i class="entypo-cancel"></i></a>
</div>
</div>
<div class="panel-body no-padding">
<span class="section-group-details" style="padding: 1em; display: block;">
<census-chart census="view.state.courses.list[view.selectedEntity.courseId].census"
term="view.state.terms.list[view.selectedEntity.termCode]"
course-id="view.selectedEntity.courseId"
sequence-pattern="view.state.courses.list[view.selectedEntity.courseId].sequencePattern"></census-chart>
<hr />
<div
class="section-group-details__variable-units--container"
ng-show="view.state.courses.list[view.selectedEntity.courseId].unitsHigh > 0"
>
<div class="section-group-details__variable-units--label">
Variable Units:
</div>
<ipa-input mode="'number'" value="view.selectedEntity.unitsVariable" on-update="updateSectionGroup(view.selectedEntity)"></ipa-input>
</div>
<hr ng-show="view.state.courses.list[view.selectedEntity.courseId].unitsHigh > 0" />
<table class="table sections-table" style="margin-bottom: 5px;" ng-if="view.selectedEntity.sectionIds.length">
<colgroup>
<col style="width: 50%;">
<col style="width: 40%;">
<col style="width: 10%;">
</colgroup>
<thead>
<tr>
<th>Section</th>
<th>Seats</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="sectionId in view.selectedEntity.sectionIds track by $index">
<td>{{ view.state.sections.list[sectionId].sequenceNumber }}</td>
<td>
<ipa-input mode="'number'"
value="view.state.sections.list[sectionId].seats"
on-update="updateSection(view.state.sections.list[sectionId])">
</ipa-input>
<span ng-if="isLocked()" ng-bind="view.state.sections.list[sectionId].seats"></span>
</td>
<td>
<a class="text-danger clickable" uib-tooltip="Delete" ng-if="!isLocked()" confirm-button="deleteSection(view.state.sections.list[sectionId])"
message="Are you sure you want to remove this section" yes="Delete" no="Cancel" placement="left">
<i class="entypo-cancel-squared"></i>
</a>
</td>
</tr>
<tr ng-if="isSeries() && view.selectedEntity.sectionIds.length > 1">
<td><strong>Total</strong></td>
<td class="text-center"
ng-class="{'section-group-details__total--overflow': isSeries() && view.selectedEntity.plannedSeats > 0 && sectionSeatTotal(view.selectedEntity) > view.selectedEntity.plannedSeats }">
{{ sectionSeatTotal(view.selectedEntity) }} <span ng-if="view.selectedEntity.plannedSeats > 0">/ {{ view.selectedEntity.plannedSeats }}</span>
</td>
<td></td>
</tr>
</tbody>
</table>
<div ng-if="isSeries() && view.selectedEntity.sectionIds.length > 1 && sectionSeatTotal(view.selectedEntity) > view.selectedEntity.plannedSeats" class="section-group-details__total--overflow">
<strong>
Changes have not been saved.
</strong>
<br />
<strong>
Reason: Section seating of {{ sectionSeatTotal(view.selectedEntity) }} exceeds total available course seats of {{ view.selectedEntity.plannedSeats || 0}}.
</strong>
<br />
<br />
</div>
<spinner ng-show="view.selectedEntity.id && !view.selectedEntity.sectionIds"></spinner>
<div ng-show="view.selectedEntity.sectionIds">
<div ng-if="view.selectedEntity.sectionIds.length == 0" class="text-center text-muted" style="padding: 1em;">No sections available</div>
<div class="col-sm-12 text-center" ng-if="nextSequence() && !isLocked()">
<button class="btn btn-white" uib-tooltip="Add a section" tooltip-placement="right" ng-click="addSection()">Create {{ nextSequence() }}</button>
</div>
<div class="text-center text-muted" ng-if="nextSequence() == ''">
You need to set the course sequence pattern before you can create sections
</div>
</div>
<div class="col-sm-12 text-center" ng-if="!view.selectedEntity.id">
<p>No Course Offering for {{view.selectedEntity.termCode.getTermCodeDisplayName()}}</p>
<button class="btn btn-primary" ng-click="addSectionGroup()" ng-if="!isLocked()">Create Offering</button>
</div>
<div class="col-sm-12 text-center" ng-if="view.selectedEntity.id">
<hr />
<ipa-dropdown
class="section-group-details__terms-dropdown"
ng-if="!isLocked() && showTermDropdown"
items="termDropdownItems"
button-text="'Move Offering to Different Term'"
select-item="toggleMoveCourseModal(item.sectionGroup, item.id)"
style="'minimal'"
is-wide="true"
overflow-auto="true"
></ipa-dropdown>
<div class="section-group-details__convert-offering-container">
<button
class="btn btn-primary"
ng-click="convertOffering()"
ng-if="!isLocked()">
Convert to {{isSeries() ? "Lecture" : "Discussion"}}
</button>
</div>
<button
class="btn btn-danger"
ng-if="!isLocked()"
confirm-button="removeSectionGroup(view.selectedEntity)"
message="Are you sure you want to delete this offering? this will also delete all of its sections and meetings"
yes="Delete"
no="Cancel"
placement="left"
>
Delete Offering
</button>
</div>
</span>
</div>
</div>