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

Added visits stub + some improvements

parent 8423c691
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.contrib.auth.models import User, AnonymousUser
import datetime
......@@ -236,7 +236,11 @@ class Worker (models.Model):
@staticmethod
def get_details(the_user):
if the_user.is_authenticated == False:
return ('Guest', 'Test account')
person = Worker.objects.filter(user=the_user)
if len(person) == 0:
return ('Guest', 'Test account')
else:
......
......@@ -258,6 +258,13 @@ desired effect
</a>
</li>
<li data-desc="visits">
<a href="{% url 'web.views.visits' %}">
<i class="fa fa-id-card-o"></i>
<span>Visits</span>
</a>
</li>
<li data-desc="assignments">
<a href="{% url 'web.views.assignments' %}">
<i class="fa fa-calendar"></i>
......@@ -336,13 +343,14 @@ desired effect
<footer class="main-footer">
{% block footer %}
<!-- To the right -->
<div class="pull-right hidden-xs">
<!--<div class="pull-right hidden-xs">
-
</div>
</div>-->
<!-- Default to the left -->
Footer text (eg. <small>
2017, Parkinson Research Clinic <!--(eg. <small>
<strong>Copyright &copy; 2016 <a href="#">Company</a>.</strong> All rights reserved.
</small>)
</small>)-->
{% endblock footer %}
</footer>
......
......@@ -10,6 +10,23 @@
{% endblock breadcrumb %}
{% block maincontent %}
<div class="box box-danger box-solid">
<div class="box-header with-border">
<h3 class="box-title">Not yet implemented</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
This is only a static page to show, how the system would look like.
Any changes to the system (eg. adding new flying team, modifying list of visit types) can be made by the administrator in the administration panel.
</div>
<!-- /.box-body -->
</div>
<div class="row">
<div class="col-md-3">
<div class="bg-red-active small-box">
......
......@@ -6,21 +6,21 @@
<title>Scheduling System | Log in</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{% block styles %}
{% block styles %}
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="{% static 'AdminLTE/css/bootstrap.min.css' %}">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="{% static 'AdminLTE/css/AdminLTE.min.css' %}">
<link rel="stylesheet" href="{% static 'AdminLTE/css/skins/skin-green.min.css' %}">
<!-- iCheck -->
<link rel="stylesheet" href="{% static 'AdminLTE/plugins/iCheck/square/blue.css' %}">
......@@ -29,7 +29,7 @@
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.login-logo-h5 {
margin-top: -10px;
......@@ -48,7 +48,7 @@
<h5 class="login-logo-h5">(Smart Scheduling)</h5>
</div>
<!-- /.login-logo -->
{% if state == "logout" %}
<div class="callout callout-info">
<h4>Success!</h4>
......@@ -70,14 +70,14 @@
{% else %}
<hr />
{% endif %}
<p class="login-box-msg">Please sign in</p>
<form action="{% url 'web.views.login' %}" method="post">
{% csrf_token %}
<div class="form-group has-feedback">
<input type="text" name="username" class="form-control" placeholder="E-mail">
<input type="text" name="username" class="form-control" placeholder="Login">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
......@@ -99,7 +99,7 @@
<!-- /.col -->
</div>
</form>
<hr />
<a href="#">I forgot my password</a><br>
......@@ -114,8 +114,8 @@
<!-- jQuery 2.2.3 -->
<script src="{% static 'AdminLTE/plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{% static 'AdminLTE/js/bootstrap.min.js' %}"></script>
<script src="{% static 'AdminLTE/js/bootstrap.min.js' %}"></script>
<!-- iCheck -->
<script src="{% static 'AdminLTE/plugins/iCheck/icheck.min.js' %}"></script>
<script>
......
......@@ -16,6 +16,23 @@
{% endblock breadcrumb %}
{% block maincontent %}
<div class="box box-danger box-solid">
<div class="box-header with-border">
<h3 class="box-title">Not yet implemented</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
This is only a static page to show, how the system would look like.
A comprehensive system for template editing and generation has to be developed.
</div>
<!-- /.box-body -->
</div>
<div>
<a class="btn btn-app">
<i class="fa fa-plus"></i> Add new letter
......@@ -74,10 +91,10 @@
{% block scripts %}
{{ block.super }}
<script src="{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"></script>
<script>
$(function () {
$('#table').DataTable({
......
<li><a href="{% url 'web.views.assignments' %}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">
<a href="{% url 'web.views.visits' %}">Visits</a>
</li>
{% extends "_base.html" %}
{% load static %}
{% block styles %}
{{ block.super }}
<!-- DataTables -->
<link rel="stylesheet" href="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.css' %}">
<!-- fullCalendar 2.2.5-->
<link rel="stylesheet" href="{% static 'AdminLTE/plugins/fullcalendar/fullcalendar.min.css' %}">
<link rel="stylesheet" href="{% static 'AdminLTE/plugins/fullcalendar/fullcalendar.print.css' %}" media="print">
{% endblock styles %}
{% block page_title %}'visits'{% endblock page_title %}
{% block page_header %}Visits{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% block title %}{{ block.super }} - Visits{% endblock %}
{% block breadcrumb %}
{% include "visits/breadcrumb.html" %}
{% endblock breadcrumb %}
{% block maincontent %}
<div class="row">
<div class="col-md-12">
<h3>Planning</h3>
None
</div>
</div>
{% endblock maincontent %}
{% block scripts %}
{{ block.super }}
<script src="{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/moment.js/moment.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/fullcalendar/fullcalendar.min.js' %}"></script>
{% endblock scripts %}
......@@ -36,6 +36,9 @@ def login(request):
Saturates response with information about logged user
"""
def wrap_response(request, template, params):
print request
print request.user
person, role = Worker.get_details(request.user)
final_params = params.copy()
......@@ -56,6 +59,10 @@ def assignments(request):
return wrap_response(request, 'assignments/index.html', {})
def visits(request):
return wrap_response(request, 'visits/index.html', {})
def subjects(request):
subjects_list = Subject.objects.order_by('-lastName')
context = {
......
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