-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
96 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ var/ | |
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
.DS_Store | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
trix/trix_admin/templates/trix_admin/roleselect.django.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% extends "django_cradmin/roleselect.django.html" %} | ||
{% load i18n %} | ||
|
||
{% block body %} | ||
<div class="container" style="margin-top: 20px;"> | ||
<a href="{% url 'trix_student_dashboard' %}"> | ||
<span class="fa fa-arrow-left"></span> | ||
{% trans "Back to the website" %} | ||
</a> | ||
</div> | ||
|
||
{{ block.super }} | ||
|
||
<div class="container" style="margin-top: 40px;"> | ||
<h2>{% trans "Documentation" %}</h2> | ||
<a href="{{ TRIX_ADMIN_DOCUMENTATION_URL }}">{{ TRIX_ADMIN_DOCUMENTATION_LABEL }}</a> | ||
|
||
<h2>{% trans "Edit courses and users?" %}</h2> | ||
<p>{% trans "Need to create/edit courses, change active semester or edit users?" %} | ||
{% if user.is_admin %} | ||
<a href="{% url 'admin:index' %}">{% trans "Go to the superuser panel" %}</a>. | ||
{% else %} | ||
{% trans "You need to ask a superuser to grant you superuser access." %} | ||
{% endif %} | ||
</p> | ||
</div> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.conf import settings | ||
from django.utils.translation import ugettext_lazy as _ | ||
from django_cradmin.views import roleselect | ||
|
||
|
||
class TrixRoleSelectView(roleselect.RoleSelectView): | ||
pagetitle=_('Select a course to edit create/edit assignments') | ||
template_name = 'trix_admin/roleselect.django.html' | ||
autoredirect_if_single_role = False | ||
|
||
def get_context_data(self, **kwargs): | ||
context = super(TrixRoleSelectView, self).get_context_data(**kwargs) | ||
context['TRIX_ADMIN_DOCUMENTATION_URL'] = settings.TRIX_ADMIN_DOCUMENTATION_URL | ||
context['TRIX_ADMIN_DOCUMENTATION_LABEL'] = settings.TRIX_ADMIN_DOCUMENTATION_LABEL | ||
return context |