Commit 539ad5c5cb0db9811ac371753e1662449619a6b6
Exists in
master
and in
5 other branches
Merge branch 'master' of https://github.com/amadeusproject/amadeuslms
Showing
3 changed files
with
8 additions
and
2 deletions
Show diff stats
app/templates/home.html
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | <div id="timeline"> |
109 | 109 | {% include page_template %} |
110 | 110 | </div> |
111 | - <div id="loading" class="alert alert-primary" role="alert"> | |
111 | + <div id="loading" class="alert alert-primary" role="alert" style="display: none"> | |
112 | 112 | <center> |
113 | 113 | <span class="fa fa-spin fa-circle-o-notch"></span> |
114 | 114 | </center> | ... | ... |
app/views.py
... | ... | @@ -32,11 +32,17 @@ class AppIndex(LoginRequiredMixin, LogMixin, ListView, NotificationMixin): |
32 | 32 | def render_to_response(self, context, **response_kwargs): |
33 | 33 | if self.request.user.is_staff: |
34 | 34 | context['page_template'] = "home_admin_content.html" |
35 | + else: | |
36 | + context['page_template'] = "home_teacher_student_content.html" | |
35 | 37 | |
36 | 38 | context['title'] = 'Amadeus' |
37 | 39 | |
38 | 40 | if self.request.is_ajax(): |
39 | - self.template_name = "home_admin_content.html" | |
41 | + if self.request.user.is_staff: | |
42 | + self.template_name = "home_admin_content.html" | |
43 | + else: | |
44 | + self.template_name = "home_teacher_student_content.html" | |
45 | + | |
40 | 46 | |
41 | 47 | super(AppIndex, self).createNotification("teste", not_resource="home", resource_link="/register") |
42 | 48 | ... | ... |