Commit 346e0a08f5cf5ca65f445250f8b421415ee8235c
1 parent
9a603ad6
Exists in
master
and in
5 other branches
modifying view course #205
Showing
1 changed file
with
70 additions
and
49 deletions
Show diff stats
courses/templates/course/view.html
... | ... | @@ -19,21 +19,34 @@ |
19 | 19 | {% endblock %} |
20 | 20 | |
21 | 21 | {% block sidebar %} |
22 | - {{block.super}} | |
22 | + <div class="panel panel-primary"> | |
23 | + <div class="panel-heading"> | |
24 | + <h5>{% trans 'Menu' %}</h5> | |
25 | + </div> | |
26 | + <div class="panel-body"> | |
27 | + <ul class="nav nav-pills nav-stacked"> | |
28 | + <li><a href="{% url 'core:home' %}">{% trans "Home" %}</a></li> | |
29 | + <li><a href="{% url 'users:profile' %}">{% trans 'Profile' %}</a></li> | |
30 | + <li><a href="{% url 'course:manage' %}">{% trans 'My Courses' %}</a></li> | |
31 | + <li><a href="{% url 'core:guest' %}">{% trans 'All Courses' %}</a></li> | |
32 | + </ul> | |
33 | + </div> | |
34 | + </div> | |
35 | + | |
23 | 36 | |
24 | 37 | {% endblock %} |
25 | 38 | |
26 | 39 | {% block content %} |
27 | 40 | |
28 | - <div class="col-md-12"> | |
41 | + <div class="col-md-12 cards-content"> | |
29 | 42 | <div class="panel panel-info"> |
30 | - <div class="panel-heading headingOne"> | |
43 | + <div class="panel-heading course-detail"> | |
31 | 44 | <div class="row"> |
32 | - <div class="col-xs-8 col-md-10 titleTopic"> | |
33 | - <h4>{{course}}</h4> | |
45 | + <div class="col-xs-8 col-md-4 .titleTopic-detail"> | |
46 | + <h4>{{course.name}}</h4> | |
34 | 47 | </div> |
35 | 48 | {% if user|has_role:'professor' and user in course.professors or user|has_role:'system_admin' %} |
36 | - <div class="col-xs-4 col-md-2" id="divMoreActions"> | |
49 | + <div class="col-xs-4 col-md-8" id="divMoreActions"> | |
37 | 50 | <div class="btn-group"> |
38 | 51 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
39 | 52 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
... | ... | @@ -50,10 +63,10 @@ |
50 | 63 | </div> |
51 | 64 | </div> |
52 | 65 | <div class="panel-body"> |
53 | - <p><b>{% trans 'Course Name' %}: </b>{{course.name}}</p> | |
54 | - <p><b>{% trans 'Coordinator' %}: </b>{{course.professors}}</p> | |
66 | + <p><b>Course Name: </b>{{course.name}}</p> | |
67 | + <p><b>Coordinator: </b>{{course.professors}}</p> | |
55 | 68 | <p> |
56 | - <b>{% trans 'Description' %}:</b> | |
69 | + <b>Description:</b> | |
57 | 70 | <i> |
58 | 71 | {{course.description}} |
59 | 72 | </i> |
... | ... | @@ -61,7 +74,7 @@ |
61 | 74 | |
62 | 75 | </div> |
63 | 76 | </div> |
64 | - | |
77 | + | |
65 | 78 | <!-- MODAL CREATE SUBJECT --> |
66 | 79 | <div class="modal" tabindex="-1" role="dialog " id="createSubject"> |
67 | 80 | <div class="modal-dialog"> |
... | ... | @@ -108,26 +121,29 @@ |
108 | 121 | </div> |
109 | 122 | </div> |
110 | 123 | </div> |
111 | -<div> | |
124 | +<div class="cards-detail"> | |
112 | 125 | {% if request.GET.category == 'all' or none or request.GET.category == '' %} |
113 | 126 | {% for subject in subjects %} |
114 | - <div class="panel panel-info panel_{{ subject.id }}"> | |
115 | - <div class="panel-heading headingTwo ui-sortable-handle" role="tab"> | |
127 | + <div class="panel panel-default panel_{{ subject.id }}"> | |
128 | + <div class="panel-heading heading_{{subject.id}} subject ui-sortable-handle"> | |
116 | 129 | <div class="row"> |
117 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
118 | - <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> | |
119 | - <h4 style="color:white">{{subject.name}}</h4> | |
130 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{subject.slug}}" href=".collapseSubject-{{subject.slug}}" aria-expanded="false" aria-controls="collapseSubject-{{subject.slug}}"> | |
131 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
132 | + </div> | |
133 | + <div class="col-xs-9 col-md-4 titleTopic"> | |
134 | + <a role="button" href="{% url 'course:view_subject' subject.slug %}"> | |
135 | + <h4>{{subject.name}}</h4> | |
120 | 136 | </a> |
121 | 137 | </div> |
122 | 138 | {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} |
123 | - <div class="col-xs-3 col-md-2" id="divMoreActions"> | |
139 | + <div class="col-xs-3 col-md-6" id="divMoreActions"> | |
124 | 140 | <div class="btn-group"> |
125 | 141 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
126 | 142 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
127 | 143 | </button> |
128 | 144 | <ul class="dropdown-menu" aria-labelledby="moreActions"> |
129 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans 'Replicate' %}</a></li> | |
130 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | |
145 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
146 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
131 | 147 | </ul> |
132 | 148 | </div> |
133 | 149 | </div> |
... | ... | @@ -140,47 +156,51 @@ |
140 | 156 | {% endif %} |
141 | 157 | </div> |
142 | 158 | </div> |
143 | - <div class="panel-body"> | |
144 | - <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
145 | - {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
146 | - <p> | |
147 | - <b>{% trans "Description" %}: </b> | |
148 | - <i> | |
149 | - {{subject.description}} | |
150 | - </i> | |
151 | - </p> | |
152 | - <div class="row"> | |
153 | - <div class="col-xs-6 col-md-6"> | |
154 | - <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
155 | - </div> | |
156 | - <div class="col-xs-6 col-md-6"> | |
157 | - <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
158 | - </div> | |
159 | + <div class="panel-collapse collapseSubject-{{subject.slug}} collapse in" aria-labelledby="heading_{{subject.id}}" aria-expanded="true" aria-hidden="false"> | |
160 | + <div class="panel-body"> | |
161 | + <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | |
162 | + {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | |
163 | + <p> | |
164 | + <b>{% trans "Description" %}: </b> | |
165 | + <i> | |
166 | + {{subject.description}} | |
167 | + </i> | |
168 | + </p> | |
169 | + <div class="row"> | |
170 | + <div class="col-xs-6 col-md-6"> | |
171 | + <p><b>{% trans "Begining" %}: </b>{{subject.init_date}}</p> | |
159 | 172 | </div> |
160 | - <a href="{% url 'course:view_subject' subject.slug %}" class="btn btn-raised btn-default center-block view_btn" {% if user|hide_subscribe_view_btn:subject %}style="display:none"{% endif %}>{% trans 'View Subject' %}<div class="ripple-container"></div></a> | |
161 | - </div> | |
173 | + <div class="col-xs-6 col-md-6"> | |
174 | + <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | |
175 | + </div> | |
176 | + </div> | |
177 | + </div> | |
178 | + </div> | |
162 | 179 | </div> |
163 | 180 | {% endfor %} |
164 | 181 | {% else %} |
165 | 182 | {% for subject in subjects_category %} |
166 | 183 | {% if subject.category.name == request.GET.category %} |
167 | 184 | <div class="panel panel-info panel_{{ subject.id }}"> |
168 | - <div class="panel-heading headingTwo ui-sortable-handle" role="tab"> | |
169 | - <div class="row"> | |
170 | - <div class="col-xs-9 col-md-10 titleTopic"> | |
171 | - <a role="button" data-toggle="collapse" data-parent="#accordion" href=".collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> | |
172 | - <h4 style="color:white">{{subject.name}}</h4> | |
173 | - </a> | |
174 | - </div> | |
185 | + <div class="panel-heading heading_{{subject.id}} subject ui-sortable-handle" role="tab"> | |
186 | + <div class="row"> | |
187 | + <div class="col-md-1 moreAccordion" data-toggle="collapse" data-parent="#accordion-{{subject.slug}}" href=".collapseSubject-{{subject.slug}}" aria-expanded="false" aria-controls="collapseSubject-{{subject.slug}}"> | |
188 | + <button class="btn btn-default btn-sm caret-square"><i class="fa fa-caret-square-o-down fa-2x" aria-hidden="true"></i></button> | |
189 | + </div> | |
190 | + <div class="col-xs-9 col-md-4 titleTopic"> | |
191 | + <a role="button" href="{% url 'course:view_subject' subject.slug %}"> | |
192 | + <h4>{{subject.name}}</h4> | |
193 | + </a> | |
194 | + </div> | |
175 | 195 | {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} |
176 | - <div class="col-xs-3 col-md-2" id="divMoreActions"> | |
196 | + <div class="col-xs-3 col-md-6" id="divMoreActions"> | |
177 | 197 | <div class="btn-group"> |
178 | 198 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
179 | 199 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
180 | 200 | </button> |
181 | 201 | <ul class="dropdown-menu" aria-labelledby="moreActions"> |
182 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> {% trans 'Replicate' %}</a></li> | |
183 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | |
202 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#myModal3"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Replicate</a></li> | |
203 | + <li><a href="javascript:void(0)" data-toggle="modal" data-target="#removeSubject2"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> Remove</a></li> | |
184 | 204 | </ul> |
185 | 205 | </div> |
186 | 206 | </div> |
... | ... | @@ -192,7 +212,8 @@ |
192 | 212 | {% endif %} |
193 | 213 | </div> |
194 | 214 | </div> |
195 | - <div class="panel-body"> | |
215 | + <div class="panel-collapse collapseSubject-{{subject.slug}} collapse in" aria-labelledby="heading_{{subject.id}}" aria-expanded="true" aria-hidden="false"> | |
216 | + <div class="panel-body"> | |
196 | 217 | <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} |
197 | 218 | {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> |
198 | 219 | <p> |
... | ... | @@ -209,8 +230,8 @@ |
209 | 230 | <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> |
210 | 231 | </div> |
211 | 232 | </div> |
212 | - <a href="{% url 'course:view_subject' subject.slug %}" class="btn btn-raised btn-default center-block view_btn" {% if user|hide_subscribe_view_btn:subject %}style="display:none"{% endif %}>{% trans 'View Subject' %}<div class="ripple-container"></div></a> | |
213 | 233 | </div> |
234 | + </div> | |
214 | 235 | </div> |
215 | 236 | {% endif %} |
216 | 237 | {% endfor %} | ... | ... |