Skip to content
Snippets Groups Projects
Commit 5e8bda5e authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Navigation to top-level pages

parent 34698032
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
- `virtualenv env` to create new virtualenv (contains clean python working environment)
- `. env/bin/activate` (to start using virtualenv)
- `pip install -r requirements.txt` to install project's dependencies
- Create `local_settings.py` file in `/scheduling-system/smash/web` directory, containing:
- Create `local_settings.py` file in `/scheduling-system/smash/smash` directory (see template below), and change your connection data:
```
# SECURITY WARNING: keep the secret key used in production secret!
......
......@@ -246,35 +246,35 @@ desired effect
<li class="header">Pages</li>
<li data-desc="subjects">
<a href="#">
<a href="{% url 'web.views.subjects' %}">
<i class="fa fa-users"></i>
<span>Subjects</span>
</a>
</li>
<li data-desc="assignments">
<a href="#">
<a href="{% url 'web.views.assignments' %}">
<i class="fa fa-calendar"></i>
<span>Assignments</span>
</a>
</li>
<li data-desc="doctors">
<a href="#">
<a href="{% url 'web.views.doctors' %}">
<i class="fa fa-user-md"></i>
<span>Doctors</span>
</a>
</li>
<li data-desc="equipment-and-rooms">
<a href="#">
<li data-desc="equipment_and_rooms">
<a href="{% url 'web.views.equipment_and_rooms' %}">
<i class="fa fa-building-o"></i>
<span>Equipment&amp;rooms</span>
</a>
</li>
<li data-desc="mail-templates">
<a href="#">
<li data-desc="mail_templates">
<a href="{% url 'web.views.mail_templates' %}">
<i class="fa fa-envelope-o"></i>
<span>Mail templates</span>
</a>
......@@ -304,8 +304,8 @@ desired effect
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
{{ page_header }}
<small>{{ page_description }}</small>
{% block page_header %}{% endblock page_header %}
<small>{% block page_description %}{% endblock page_description %}</small>
</h1>
<ol class="breadcrumb">
......@@ -431,6 +431,16 @@ desired effect
<!-- AdminLTE App -->
<script src="{% static 'AdminLTE/js/app.min.js' %}"></script>
<script>
var activate = function(page_to_activate) {
var $e = $(".sidebar-menu > li[data-desc='" + page_to_activate + "']");
$e.addClass("active");
};
activate({% block page_title %}{% endblock page_title %});
</script>
{% comment "TODO: Check, and add if works %}
<!-- Optionally, you can add Slimscroll and FastClick plugins.
Both of these plugins are recommended to enhance the
......
{% extends "_base.html" %}
{% block page_title %}'assignments'{% endblock page_title %}
{% block page_header %}Assignments{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% extends "_base.html" %}
{% block page_title %}'doctors'{% endblock page_title %}
{% block page_header %}Doctors'{% endblock page_header %}
{% block page_description %}information{% endblock page_description %}
{% extends "_base.html" %}
{% block page_title %}'equipment_and_rooms'{% endblock page_title %}
{% block page_header %}Equipment and rooms{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% extends "_base.html" %}
{% block content %}
<h3>Smart scheduling</h3>
{% endblock content %}
{% block page_title %}'subjects'{% endblock page_title %}
{% block page_header %}Welcome page{% endblock page_header %}
{% block page_description %}Short description{% endblock page_description %}
{% extends "_base.html" %}
{% block page_title %}'mail_templates'{% endblock page_title %}
{% block page_header %}Mail templates{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% extends "_base.html" %}
{% block page_title %}'subjects'{% endblock page_title %}
{% block page_header %}Subjects{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
......@@ -17,5 +17,10 @@ from django.conf.urls import url
from web import views
urlpatterns = [
url(r'$', views.index, name='web.views.index')
url(r'assignments$', views.assignments, name='web.views.assignments'),
url(r'subjects$', views.subjects, name='web.views.subjects'),
url(r'doctors$', views.doctors, name='web.views.doctors'),
url(r'equipment_and_rooms$', views.equipment_and_rooms, name='web.views.equipment_and_rooms'),
url(r'mail_templates$', views.mail_templates, name='web.views.mail_templates'),
url(r'$', views.index, name='web.views.index')
]
......@@ -6,8 +6,35 @@ from django.template import loader
# Create your views here.
def index(request):
template = loader.get_template("index.html")
return HttpResponse(template.render({
'page_header': 'Header',
'page_description': 'Test'
return HttpResponse(template.render({
}), request)
def assignments(request):
template = loader.get_template("assignments/index.html")
return HttpResponse(template.render({
}), request)
def subjects(request):
template = loader.get_template("subjects/index.html")
return HttpResponse(template.render({
}), request)
def doctors(request):
template = loader.get_template("doctors/index.html")
return HttpResponse(template.render({
}), request)
def equipment_and_rooms(request):
template = loader.get_template("equipment_and_rooms/index.html")
return HttpResponse(template.render({
}), request)
def mail_templates(request):
template = loader.get_template("mail_templates/index.html")
return HttpResponse(template.render({
}), request)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment