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,21 +19,34 @@ | ||
19 | {% endblock %} | 19 | {% endblock %} |
20 | 20 | ||
21 | {% block sidebar %} | 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 | {% endblock %} | 37 | {% endblock %} |
25 | 38 | ||
26 | {% block content %} | 39 | {% block content %} |
27 | 40 | ||
28 | - <div class="col-md-12"> | 41 | + <div class="col-md-12 cards-content"> |
29 | <div class="panel panel-info"> | 42 | <div class="panel panel-info"> |
30 | - <div class="panel-heading headingOne"> | 43 | + <div class="panel-heading course-detail"> |
31 | <div class="row"> | 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 | </div> | 47 | </div> |
35 | {% if user|has_role:'professor' and user in course.professors or user|has_role:'system_admin' %} | 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 | <div class="btn-group"> | 50 | <div class="btn-group"> |
38 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | 51 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
39 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | 52 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
@@ -50,10 +63,10 @@ | @@ -50,10 +63,10 @@ | ||
50 | </div> | 63 | </div> |
51 | </div> | 64 | </div> |
52 | <div class="panel-body"> | 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 | <p> | 68 | <p> |
56 | - <b>{% trans 'Description' %}:</b> | 69 | + <b>Description:</b> |
57 | <i> | 70 | <i> |
58 | {{course.description}} | 71 | {{course.description}} |
59 | </i> | 72 | </i> |
@@ -61,7 +74,7 @@ | @@ -61,7 +74,7 @@ | ||
61 | 74 | ||
62 | </div> | 75 | </div> |
63 | </div> | 76 | </div> |
64 | - | 77 | + |
65 | <!-- MODAL CREATE SUBJECT --> | 78 | <!-- MODAL CREATE SUBJECT --> |
66 | <div class="modal" tabindex="-1" role="dialog " id="createSubject"> | 79 | <div class="modal" tabindex="-1" role="dialog " id="createSubject"> |
67 | <div class="modal-dialog"> | 80 | <div class="modal-dialog"> |
@@ -108,26 +121,29 @@ | @@ -108,26 +121,29 @@ | ||
108 | </div> | 121 | </div> |
109 | </div> | 122 | </div> |
110 | </div> | 123 | </div> |
111 | -<div> | 124 | +<div class="cards-detail"> |
112 | {% if request.GET.category == 'all' or none or request.GET.category == '' %} | 125 | {% if request.GET.category == 'all' or none or request.GET.category == '' %} |
113 | {% for subject in subjects %} | 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 | <div class="row"> | 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 | </a> | 136 | </a> |
121 | </div> | 137 | </div> |
122 | {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} | 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 | <div class="btn-group"> | 140 | <div class="btn-group"> |
125 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | 141 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
126 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | 142 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
127 | </button> | 143 | </button> |
128 | <ul class="dropdown-menu" aria-labelledby="moreActions"> | 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 | </ul> | 147 | </ul> |
132 | </div> | 148 | </div> |
133 | </div> | 149 | </div> |
@@ -140,47 +156,51 @@ | @@ -140,47 +156,51 @@ | ||
140 | {% endif %} | 156 | {% endif %} |
141 | </div> | 157 | </div> |
142 | </div> | 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 | </div> | 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 | </div> | 179 | </div> |
163 | {% endfor %} | 180 | {% endfor %} |
164 | {% else %} | 181 | {% else %} |
165 | {% for subject in subjects_category %} | 182 | {% for subject in subjects_category %} |
166 | {% if subject.category.name == request.GET.category %} | 183 | {% if subject.category.name == request.GET.category %} |
167 | <div class="panel panel-info panel_{{ subject.id }}"> | 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 | {% if user|has_role:'professor' and user in subject.professors or user|has_role:'system_admin' %} | 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 | <div class="btn-group"> | 197 | <div class="btn-group"> |
178 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | 198 | <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
179 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> | 199 | <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i> |
180 | </button> | 200 | </button> |
181 | <ul class="dropdown-menu" aria-labelledby="moreActions"> | 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 | </ul> | 204 | </ul> |
185 | </div> | 205 | </div> |
186 | </div> | 206 | </div> |
@@ -192,7 +212,8 @@ | @@ -192,7 +212,8 @@ | ||
192 | {% endif %} | 212 | {% endif %} |
193 | </div> | 213 | </div> |
194 | </div> | 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 | <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} | 217 | <p><b>{% trans "Professor" %}: </b>{% for professor in subject.professors.all %}{% if not forloop.first %},{% endif %} |
197 | {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> | 218 | {{professor}}{% if forloop.last %}.{% endif %}{% endfor %}</p> |
198 | <p> | 219 | <p> |
@@ -209,8 +230,8 @@ | @@ -209,8 +230,8 @@ | ||
209 | <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> | 230 | <p><b>{% trans "End" %}: </b>{{subject.end_date}}</p> |
210 | </div> | 231 | </div> |
211 | </div> | 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 | </div> | 233 | </div> |
234 | + </div> | ||
214 | </div> | 235 | </div> |
215 | {% endif %} | 236 | {% endif %} |
216 | {% endfor %} | 237 | {% endfor %} |