First version

This commit is contained in:
Joshua Rubingh 2020-05-13 15:54:40 +02:00
parent b26ed98cd4
commit a4c55565ec
69 changed files with 2899 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
.vscode
python3_env
test
*.pyc
*.mo
db.sqlite3
.env

View File

@ -0,0 +1 @@
default_app_config = 'apps.RUG_template.apps.RugTemplateConfig'

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class RugTemplateConfig(AppConfig):
name = 'apps.RUG_template'
label = 'RUG_template'
verbose_name = _('RUG_template')
verbose_name_plural = _('RUG_template')

View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View File

@ -0,0 +1,24 @@
.rug-wrapper {
max-width: 80% !important;
}
.rug-width-m-8-24 {
width: 25%;
}
.rug-panel--content {
max-width: none;
}
.rug-nav--main__item {
display: none;
}
.rug-nav--main__item:first-of-type,
.rug-nav--main__item:last-of-type {
display: block;
}
.rug-breadcrumbs {
display: none;
}

View File

@ -0,0 +1,608 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#" lang="nl">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% trans "Welcome at RUG" %}{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://www.rug.nl/_definition/shared/css/jquery-smoothness/jquery-ui.min.css?version=2019-12-12" rel="stylesheet">
<link href="https://www.rug.nl/_definition/shared/css/jquery-ui-timepicker-addon.css?version=2019-12-12" rel="stylesheet">
<link href="https://www.rug.nl/_definition/shared/css/styles_v2.css?version=2019-12-12" rel="stylesheet" type="text/css">
<link href="https://www.rug.nl/_definition/shared/css/fotorama.css?version=2019-12-12" rel="stylesheet" type="text/css">
<link href="https://www.rug.nl/apple-touch-icon-57x57.png" sizes="57x57" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-114x114.png" sizes="114x114" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-72x72.png" sizes="72x72" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-144x144.png" sizes="144x144" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-60x60.png" sizes="60x60" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-120x120.png" sizes="120x120" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-76x76.png" sizes="76x76" rel="apple-touch-icon">
<link href="https://www.rug.nl/apple-touch-icon-152x152.png" sizes="152x152" rel="apple-touch-icon">
<link href="https://www.rug.nl/icon.ico" rel="shortcut icon">
<meta content="#cc0000" name="msapplication-TileColor">
<meta content="https://www.rug.nl/mstile-144x144.png" name="msapplication-TileImage">
<meta content="user-scalable=1, initial-scale=1.0" name="viewport">
{% comment %}
<script type="text/javascript">
var alertsHref = "";
</script>
{% endcomment %}
<script src="https://www.rug.nl/_definition/shared/js/jquery.js?version=2019-12-12" type="text/javascript"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script src="https://www.rug.nl/_definition/shared/js/jquery-ui.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/jquery-ui-timepicker-addon.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/js-cookie.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/md5.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/rug-shared.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/jquery.dialogOptions.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/jquery.dialogOptions-rug.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/messages!js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/formfunctions.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/imagesloaded.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/jquery.mobile.custom.min.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/fotorama.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/interface.bundle.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/content.bundle.js?version=2019-12-12" type="text/javascript"></script>
<script src="https://www.rug.nl/_definition/shared/js/filemanager.bundle.js?version=2019-12-12" type="text/javascript"></script>
<script type="text/javascript" src="https://www.rug.nl/_definition/shared/js/cross-frame.js?version=2019-12-12"></script>
<link href="{% static 'RUG_template/css/base.css' %}" rel="stylesheet"/>
</head>
<body itemtype="http://schema.org/WebPage" itemscope="itemscope" id="top" class="page--topicpage"><!--googleoff: all-->
<noscript>
<strong>Javascript must be enabled for the correct page display</strong>
</noscript>
<a href="#main" class="rug-hidden-visually rug-hidden-visually--focusable">Skip to Content</a><a href="#nav" class="rug-hidden-visually rug-hidden-visually--focusable">Skip to Navigation</a>
<header data-toggle-group="mainmenu" data-toggle-class="rug-site-header--open" data-toggle-id="menu-show" class="rug-site-header js--togglable-item js--sticky-header">
<div class="rug-wrapper rug-wrapper--big rug-wrapper--flush">
<div class="rug-site-header__bar">
<a class="rug-site-header__item" accesskey="1" href="https://www.rug.nl/"><img class="rug-site-logo" src="https://www.rug.nl/_definition/shared/images/logo--nl.svg" alt="Rijksuniversiteit Groningen"><span class="rug-hidden-visually">Rijksuniversiteit Groningen</span></a><span class="rug-site-header__item"><span class="rug-site-header__text rug-site-header__slogan rug-hidden-l">founded in 1614 &nbsp;-&nbsp; top 100 university</span></span>
<div class="rug-site-header__item rug-site-header__item--close">
<a href="#" data-toggle-group="mainmenu" data-toggle-class="rug-toggleable" data-toggle-id="menu-hide" class="rug-button rug-font-white rug-button--nav js--togglable-switch">Sluiten<span class="rug-icon rug-icon--l rug-icon--close rug-ml-xxs" aria-hidden="true"></span></a>
</div>
<nav class="rug-site-header__item">
<ul class="rug-nav--meta">
<li class="rug-nav--meta__item rug-nav--meta__item--mobile">
<a href="#" data-toggle-group="mainmenu" data-toggle-class="rug-toggleable" data-toggle-id="menu-show" class="js-id--main_menu_toggle js--togglable-switch rug-font-black"><span class="rug-icon rug-icon--menu rug-mr-s" aria-hidden="true"></span><span class="rug-icon rug-icon--search" aria-hidden="true"></span><span class="rug-hidden-visually">Menu en zoeken</span></a>
</li>
<li class="rug-nav--meta__item">
<a href="https://www.rug.nl/info/contact" accesskey="5" class="rug-nav--meta__link js--main-menu-clone">Contact</a>
</li>
<li class="rug-nav--meta__item">
<a href="https://myuniversity.rug.nl/infonet/medewerkers/dashboard/" accesskey="5" class="rug-nav--meta__link js--main-menu-clone">My University</a>
</li>
<li class="rug-nav--meta__item">
<a href="https://studentportal.rug.nl/" accesskey="5" class="rug-nav--meta__link js--main-menu-clone">Student Portal</a>
</li>
<li class="rug-nav--meta__item" title="{% trans "Language selection" %}">
{% comment %} Language choice. Should be put somewhere else when finale designs are done. {% endcomment %}
<form action="{% url 'set_language' %}" method="post" id="language_form">
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
<input name="next" type="hidden" value="{% if redirect_to %}{{ redirect_to }}{% endif %}">
<input type="hidden" name="language" id="language" value="{{LANGUAGE_CODE}}">
{% for language in languages %}
<a onclick="jQuery('form#language_form input#language').val('{{ language.code }}'); jQuery('form#language_form').submit(); return false; " class="rug-mr-xs" href="#">
<span class="rug-sprite--flag--{{ language.code }}"></span><span class="rug-hidden-visually">{{ language.name_local }}</span></a>
{% endfor %}
</form>
</li>
</ul>
</nav>
</div>
</div>
<div class="rug-background-menu rug-shadow-box-inset">
<div class="rug-wrapper rug-wrapper--big rug-wrapper--flush">
<form name="gs" id="search-form" action="https://www.rug.nl/search/" class="rug-site-search rug-mb-0">
<fieldset class="rug-mb-0 rug-shadow-box">
<legend class="rug-hidden-visually">Zoeken</legend><label for="searchtext" class="rug-hidden-visually">Zoeken</label><input placeholder="Zoeken..." id="searchtext" type="text" accesskey="4" autocomplete="off" role="combobox" aria-haspopup="false" name="q" class="rug-site-search__input q text"><input value="true" name="isNewSearch" type="hidden"><button type="submit" class="rug-site-search__button"><span class="rug-icon rug-icon--l rug-icon--search" aria-hidden="true"></span><span class="rug-hidden-visually">Zoeken</span></button>
</fieldset>
</form>
<nav class="rug-nav--main__container">
<ul class="rug-nav--main" id="nav">
<li class="rug-nav--main__item">
<a href="https://www.rug.nl/" data-path="/" class="rug-nav--main__button"><span class="rug-icon rug-icon--home" aria-hidden="true"></span><span class="rug-hidden-visually">Home</span></a>
</li>
<li data-path="/education/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/education/" class="rug-nav--main__link js--noclick-m"><span>Onderwijs</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/" class="rug-nav--flyout__link rug-link--caret">Onderwijs</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/bachelor/" class="rug-nav--flyout__link rug-link--caret">Bachelor</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/master/" class="rug-nav--flyout__link rug-link--caret">Master</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/exchange/" class="rug-nav--flyout__link rug-link--caret">Exchange</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/phd-programmes/" class="rug-nav--flyout__link rug-link--caret">Promotietrajecten</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/summer-winter-schools/" class="rug-nav--flyout__link rug-link--caret">Summer / Winter schools</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/society-business/knowledge-and-learning/" class="rug-nav--flyout__link rug-link--caret">Kennis en leren</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/contact/" class="rug-nav--flyout__link rug-link--caret">Contact</a>
</li>
</ul>
</div>
</div>
</div>
</li>
<li data-path="/research/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/research/" class="rug-nav--main__link js--noclick-m"><span>Onderzoek</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout rug-nav--flyout--discoverable">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item rug-width-m-12-24">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/" class="rug-nav--flyout__link rug-link--caret">Onderzoek</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/researchthemes/" class="rug-nav--flyout__link rug-link--caret">Onderzoeksthema's</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/societal-themes/" class="rug-nav--flyout__link rug-link--caret">Maatschappelijke thema's</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/institute-per-faculty/" class="rug-nav--flyout__link rug-link--caret">Onderzoekscentra en -instituten</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/education/phd-programmes/" class="rug-nav--flyout__link rug-link--caret">Promotietrajecten</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/portal/persons/search.html" class="rug-nav--flyout__link rug-link--caret">Deskundigen</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/pure/" class="rug-nav--flyout__link rug-link--caret">Onderzoeksdatabase</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/research/video-slider/" class="rug-nav--flyout__link rug-link--caret">Onderzoeksvideo's</a>
</li>
</ul>
</div>
<div class="rug-layout__item rug-width-m-12-24 js--show-random-child">
<a href="https://www.rug.nl/library/" class="rug-nav--flyout__link">
<figure class="rug-mb-s">
<img src="https://www.rug.nl/cmb/images/verwerken.jpg" alt=""></figure>Bibliotheek</a>
</div>
</div>
</div>
</li>
<li data-path="/society-business/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/society-business/" class="rug-nav--main__link js--noclick-m"><span>Maatschappij/bedrijven</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/society-business/" class="rug-nav--flyout__link rug-link--caret">Maatschappij/bedrijven</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/society-business/knowledge-and-learning/" class="rug-nav--flyout__link rug-link--caret">Kennis en leren</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/society-business/doing-research-together/" class="rug-nav--flyout__link rug-link--caret">Samen onderzoek doen</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/society-business/young-talent/" class="rug-nav--flyout__link rug-link--caret">Jong talent</a>
</li>
</ul>
</div>
</div>
</div>
</li>
<li data-path="/alumni/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/alumni/" class="rug-nav--main__link js--noclick-m"><span>Alumni</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/" class="rug-nav--flyout__link rug-link--caret">Alumni</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/for-alumni/" class="rug-nav--flyout__link rug-link--caret">Voor alumni</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/about-alumni/" class="rug-nav--flyout__link rug-link--caret">Over alumni</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/about-alumni/ambassadors/2019-2020/become-an-international-alumni-ambassador_" class="rug-nav--flyout__link rug-link--caret">Become an International Alumni Ambassador!</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/magazines-and-newsletters/" class="rug-nav--flyout__link rug-link--caret">Magazines en nieuwsbrieven</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/support-research-and-education/" class="rug-nav--flyout__link rug-link--caret">Steun onderzoek en onderwijs</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/contact/" class="rug-nav--flyout__link rug-link--caret">Contact</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/update-your-information/" class="rug-nav--flyout__link rug-link--caret">Wijzigingen doorgeven</a>
</li>
</ul>
</div>
</div>
</div>
</li>
<li data-path="/magazine/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/magazine/" class="rug-nav--main__link js--noclick-m"><span>Magazine</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/magazine/" class="rug-nav--flyout__link rug-link--caret">Magazine</a>
</li>
</ul>
</div>
</div>
</div>
</li>
<li data-path="/about-us/index.xml" class="rug-nav--main__item">
<a href="https://www.rug.nl/about-us/" class="rug-nav--main__link js--noclick-m"><span>Over ons</span><span class="rug-icon rug-icon--s rug-icon--caret-down rug-nav--main__icon" aria-hidden="true"></span></a>
<div class="rug-nav--flyout">
<div class="rug-layout rug-layout--l">
<div class="rug-layout__item rug-layout__item">
<ul class="rug-nav--flyout__list">
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/" class="rug-nav--flyout__link rug-link--caret">Over ons</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/who-are-we/strategic-plan/" class="rug-nav--flyout__link rug-link--caret">Strategisch Plan 2015-2020</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/who-are-we/" class="rug-nav--flyout__link rug-link--caret">Wie zijn wij?</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/news-and-events/" class="rug-nav--flyout__link rug-link--caret">Nieuws en evenementen</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/where-do-we-stand/" class="rug-nav--flyout__link rug-link--caret">Onze positie</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/organization/" class="rug-nav--flyout__link rug-link--caret">Onze organisatie</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/work-with-us/" class="rug-nav--flyout__link rug-link--caret">Werken bij de RUG</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/organization/faculties/" class="rug-nav--flyout__link rug-link--caret">Faculteiten</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/internationalization/" class="rug-nav--flyout__link rug-link--caret">Internationalization</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/collaboration/" class="rug-nav--flyout__link rug-link--caret">Samenwerkingsverbanden</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/about-us/how-to-find-us/" class="rug-nav--flyout__link rug-link--caret">Waar vindt u ons</a>
</li>
<li class="rug-nav--flyout__item">
<a href="https://www.rug.nl/alumni/support-research-and-education/" class="rug-nav--flyout__link rug-link--caret">Steun de RUG</a>
</li>
</ul>
</div>
</div>
</div>
</li>
<li class="rug-nav--main__item">
<a href="https://www.rug.nl/search/" class="rug-nav--main__button rug-nav--main__button--last rug-text-nowrap"><span class="rug-icon rug-icon--search" aria-hidden="true"></span><span class="rug-hidden-l rug-ml-xs">Zoeken</span></a>
</li>
</ul>
</nav>
</div>
</div>
</header>
<div class="rug-wrapper rug-wrapper--knee-high">
<div class="rug-breadcrumbs js--shrink-to-fit" itemprop="breadcrumb">
<a class="rug-breadcrumbs__link js--shrinkable" href="https://www.rug.nl/education/">Onderwijs</a><span class="rug-icon rug-icon--angle-right rug-breadcrumbs__divider"></span><a class="rug-breadcrumbs__link js--shrinkable" href="https://www.rug.nl/education/exchange/">Exchange</a>
</div>
<script type="text/javascript">
jQuery(function() {
navigation.openLastSubMenu();
});
</script>
</div>
<!--googleon: all--><div class="rug-background-white" id="main">
<div id="content" class="rug-wrapper rug-wrapper--overlay">
<div class="rug-layout">
<div class="rug-layout__item rug-width-m-8-24">
<!--googleoff: all-->
<nav>
<ul data-toggle-group="mainmenu" data-toggle-class="rug-block-max-m" data-toggle-id="menu-show" class="js--id-content-menu rug-nav--secondary rug-shadow-box js--togglable-item">
<li class="rug-nav--secondary__item rug-block-max-m ">
<a href="#" data-toggle-mode="togglable" data-toggle-group="submenu" data-toggle-class="rug-nav--secondary__link--selected" data-toggle-id="menu-main" class="rug-nav--secondary__link js--togglable-switch">HOME</a>
<ul data-toggle-group="submenu" data-toggle-class="rug-block" data-toggle-id="menu-main" class="js-id--mobilehome rug-nav--secondary__sub rug-nav--secondary__sub--hidden js--togglable-item">
<li data-menu-id="510d8573-cf08-4df5-beaf-72e59fc08035-33.14" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/education/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text">Onderwijs</span></a>
</li>
<li data-menu-id="3ae46c16-ad2e-444e-a43f-af867c3010a1-36.154" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/research/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text">Onderzoek</span></a>
</li>
<li data-menu-id="6728218e-6801-4701-a152-95d1eb7068fb-33.35" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/society-business/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text">Maatschappij/bedrijven</span></a>
</li>
<li data-menu-id="cf576754-17bf-47a8-94c9-ebe3998623e2-33.31" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/alumni/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text">Alumni</span></a>
</li>
<li data-menu-id="cdc6fddf-0fd0-44ad-ad19-c0df0260e44c-33.13" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/magazine/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text">Magazine</span></a>
</li>
<li data-menu-id="82960c9f-53bd-4ea8-a9f7-b004b86378f6-36.154" class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/about-us/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text rug-b-0">Over ons</span></a>
</li>
</ul>
</li>
{% include "menu.html" %}
<li class="rug-nav--secondary__item rug-block-max-m">
<ul class="rug-nav--secondary__sub rug-nav--secondary__sub--meta">
<li class="rug-nav--secondary__sub__item">
<a href="https://www.rug.nl/about-us/how-to-find-us/contact" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text rug-nav--secondary__sub__link-text--meta">Contact</span></a>
</li>
<li class="rug-nav--secondary__sub__item">
<a href="https://myuniversity.rug.nl/infonet/medewerkers/dashboard/" class="rug-nav--secondary__sub__link"><span class="rug-nav--secondary__sub__link-text rug-nav--secondary__sub__link-text--meta">My University</span></a>
</li>
<li class="rug-nav--secondary__sub__item">
<a href="https://studentportal.rug.nl/" class="rug-nav--secondary__sub__link" target="_blank"><span class="rug-nav--secondary__sub__link-text rug-nav--secondary__sub__link-text--meta rug-b-0">Student Portal</span></a>
</li>
<li class="rug-nav--secondary__sub__item rug-nav--secondary__sub__item--languages" title="Language select">
<a onclick="setLanguageCookie('nl',''); reloadWithoutLangParameter(); return false;" class="rug-mr-xs" href="#"><span class="rug-sprite--flag--nl"></span><span class="rug-hidden-visually">Nederlands</span></a><a onclick="setLanguageCookie('en',''); reloadWithoutLangParameter(); return false;" class="rug-mr-xs" href="#"><span class="rug-sprite--flag--en"></span><span class="rug-hidden-visually">English</span></a>
</li>
</ul>
</li>
</ul>
</nav>
<!--googleon: all-->
</div>
<div data-toggle-group="mainmenu" data-toggle-id="menu-show" data-toggle-class="rug-hidden-m--block" class="rug-layout__item rug-width-m-16-24">
<!--googleoff: snippet-->
<div class="rug-panel--content rug-panel--content--border">
<h1 class="rug-mb-0 rug-clearfix" lang="en">
<span lang="en">{% block pagetitle %} -=PageTitle=- {% endblock %}</span>
</h1>
</div>
<div id="target-content-holder"></div>
<!--googleon: snippet-->
<div>
{% if messages %}
{% for message in messages %}
<script>
toastr.info('{{ message }}');
</script>
{% endfor %}
{% endif %}
<article class="rug-clearfix rug-theme--content rug-mb" lang="en">
<div>
{% block content %} -=PageContent=- {% endblock %}
</div>
</article>
<!--googleoff: all-->
<div class="rug-layout rug-mt">
</div>
<!--googleon: all-->
</div>
<!--googleoff: all-->
<div class="rug-site-tools">
<a title="Print this page" href="#" data-label="page-tools print" data-category="button" class="js--analytics rug-site-tools__link rug-site-tools__icon" onClick="window.print(); return false;"><span class="rug-icon rug-icon--printer rug-mh-xxs" aria-hidden="true"></span><span class="rug-hidden-visually">print</span></a>
</div>
<!--googleon: all-->
</div>
</div>
</div>
</div><!--googleoff: all--><div data-toggle-group="mainmenu" data-toggle-id="menu-show" data-toggle-class="rug-hidden-m--block" class="rug-wrapper">
<aside class="rug-panel rug-panel--primary rug-p-0 rug-mt">
<div class="rug-layout rug-col-l-8-24 rug-col-s-12-24 rug-overflow-hidden rug-layout--no-margins"></div>
</aside>
</div><!--googleon: all-->
<!--googleoff: all--><div data-toggle-group="mainmenu" data-toggle-id="menu-show" data-toggle-class="rug-hidden-m--block" class="rug-background-white rug-pv-l rug-text-center">
<div class="rug-wrapper">
<div class="rug-layout">
<div class="rug-layout__item">
<span class="rug-mr-m">Volg de RUG</span><a href="https://www.facebook.com/universityofgroningen" class=""><span title="facebook" class="rug-icon rug-icon--l rug-icon--facebook"></span><span class="rug-hidden-visually">facebook</span></a> <a href="https://twitter.com/univgroningen" class=""><span title="twitter" class="rug-icon rug-icon--l rug-icon--twitter"></span><span class="rug-hidden-visually">twitter</span></a> <a href="https://www.linkedin.com/school/rijksuniversiteit-groningen/" class=""><span title="linkedin" class="rug-icon rug-icon--l rug-icon--linkedin"></span><span class="rug-hidden-visually">linkedin</span></a> <a href="https://www.rug.nl/corporate/nieuws/RSSfeeds" class=""><span title="rss" class="rug-icon rug-icon--l rug-icon--rss"></span><span class="rug-hidden-visually">rss</span></a> <a href="https://www.instagram.com/universityofgroningen/" class=""><span title="instagram" class="rug-icon rug-icon--l rug-icon--instagram"></span><span class="rug-hidden-visually">instagram</span></a> <a href="https://www.youtube.com/universityGroningen" class=""><span title="youtube" class="rug-icon rug-icon--l rug-icon--youtube"></span><span class="rug-hidden-visually">youtube</span></a>
</div>
</div>
</div>
</div>
<footer data-toggle-group="mainmenu" data-toggle-id="menu-show" data-toggle-class="rug-hidden-m--block"><div class="rug-doormat rug-background-neutral-30">
<div class="rug-wrapper">
<div class="rug-layout rug-layout--no-margins">
<div class="rug-layout__item rug-width-s-12-24 rug-width-l-6-24">
<a href="https://www.rug.nl/education/" class="rug-doormat__heading__link rug-doormat__heading__link--desktop">Studiekiezers</a><a href="https://www.rug.nl/education/" class="rug-doormat__heading__link rug-doormat__heading__link--mobile js--equal js--togglable-switch" data-toggle-id="N10006" data-toggle-class="rug-doormat__heading__link--active" data-toggle-group="js-id-doormat" data-toggle-mode="togglable">Studiekiezers</a>
<ul class="rug-doormat__list rug-list--unstyled">
<li>
<a href="https://www.rug.nl/education/" class="rug-doormat__link rug-doormat__link--mobile">Studiekiezers</a>
</li>
<li>
<a href="https://www.rug.nl/education/bachelor/events/" class="rug-doormat__link">Voorlichtingsactiviteiten voor studiekiezers</a>
</li>
<li>
<a href="https://www.rug.nl/bachelors/" class="rug-doormat__link">Bacheloropleidingen</a>
</li>
<li>
<a href="https://www.rug.nl/education/master/" class="rug-doormat__link">Masteropleidingen</a>
</li>
<li>
<a href="https://www.rug.nl/gmw/lerarenopleiding/" class="rug-doormat__link">Lerarenopleiding</a>
</li>
<li>
<a href="https://www.rug.nl/society-business/scholierenacademie/" class="rug-doormat__link">Scholierenacademie</a>
</li>
<li>
<a href="https://www.rug.nl/education/summer-winter-schools/" class="rug-doormat__link">Summer Schools</a>
</li>
<li>
<a href="https://www.rug.nl/education/honours-college/" class="rug-doormat__link">Honours College</a>
</li>
<li>
<a href="https://www.rug.nl/education/phd-programmes/" class="rug-doormat__link">Promotietrajecten</a>
</li>
<li>
<a href="https://www.rug.nl/education/faq/" class="rug-doormat__link">Veelgestelde vragen</a>
</li>
</ul>
</div>
<div class="rug-layout__item rug-width-s-12-24 rug-width-l-6-24">
<a href="https://www.rug.nl/society-business/" class="rug-doormat__heading__link rug-doormat__heading__link--desktop">Maatschappij/bedrijven</a><a href="https://www.rug.nl/society-business/" class="rug-doormat__heading__link rug-doormat__heading__link--mobile js--equal js--togglable-switch" data-toggle-id="N100DA" data-toggle-class="rug-doormat__heading__link--active" data-toggle-group="js-id-doormat" data-toggle-mode="togglable">Maatschappij/bedrijven</a>
<ul class="rug-doormat__list rug-list--unstyled">
<li>
<a href="https://www.rug.nl/society-business/" class="rug-doormat__link rug-doormat__link--mobile">Maatschappij/bedrijven</a>
</li>
<li>
<a href="https://www.rug.nl/library/" class="rug-doormat__link">Universiteitsbibliotheek</a>
</li>
<li>
<a href="https://www.rug.nl/research/portal/persons/search.html" class="rug-doormat__link">Zoek een deskundige</a>
</li>
<li>
<a href="https://www.rug.nl/language-centre/" class="rug-doormat__link">Talencentrum</a>
</li>
<li>
<a href="https://www.rug.nl/society-business/doing-research-together/ipbd/" class="rug-doormat__link">IP &amp; Business Development</a>
</li>
<li>
<a href="https://www.rug.nl/society-business/centre-for-information-technology/" class="rug-doormat__link">Centrum voor Informatie Technologie</a>
</li>
<li>
<a href="https://www.rug.nl/university-museum/" class="rug-doormat__link">Universiteitsmuseum</a>
</li>
<li>
<a href="https://shop.housing.rug.nl/shopuw/" class="rug-doormat__link" target="_blank">Universiteitswinkel</a>
</li>
<li>
<a href="https://www.rug.nl/careerservices/" class="rug-doormat__link">Career Services</a>
</li>
<li>
<a href="http://sggroningen.nl/" class="rug-doormat__link" target="_blank">Studium Generale</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/who-are-we/sustainability/greenoffice/" class="rug-doormat__link">Duurzame universiteit</a>
</li>
<li>
<a href="https://www.rug.nl/society-business/science-shops/" class="rug-doormat__link">Wetenschapswinkel</a>
</li>
</ul>
</div>
<div class="rug-layout__item rug-width-s-12-24 rug-width-l-6-24">
<a href="https://www.rug.nl/alumni/" class="rug-doormat__heading__link rug-doormat__heading__link--desktop">Alumni</a><a href="https://www.rug.nl/alumni/" class="rug-doormat__heading__link rug-doormat__heading__link--mobile js--equal js--togglable-switch" data-toggle-id="N101CF" data-toggle-class="rug-doormat__heading__link--active" data-toggle-group="js-id-doormat" data-toggle-mode="togglable">Alumni</a>
<ul class="rug-doormat__list rug-list--unstyled">
<li>
<a href="https://www.rug.nl/alumni/" class="rug-doormat__link rug-doormat__link--mobile">Alumni</a>
</li>
<li>
<a href="https://www.rug.nl/alumni/news-events/events/" class="rug-doormat__link">Alumni activiteiten</a>
</li>
<li>
<a href="https://www.rug.nl/alumni/magazines-and-newsletters/" class="rug-doormat__link">Magazines en nieuwsbrieven</a>
</li>
<li>
<a href="https://www.rug.nl/alumni/update-your-information/" class="rug-doormat__link">Wijzigingen doorgeven</a>
</li>
<li>
<a href="https://www.rug.nl/alumni/support-research-and-education/" class="rug-doormat__link">Steun onderzoek en onderwijs</a>
</li>
</ul>
</div>
<div class="rug-layout__item rug-width-s-12-24 rug-width-l-6-24">
<a href="https://www.rug.nl/about-us/" class="rug-doormat__heading__link rug-doormat__heading__link--desktop">Over ons</a><a href="https://www.rug.nl/about-us/" class="rug-doormat__heading__link rug-doormat__heading__link--mobile js--equal js--togglable-switch" data-toggle-id="N1022C" data-toggle-class="rug-doormat__heading__link--active" data-toggle-group="js-id-doormat" data-toggle-mode="togglable">Over ons</a>
<ul class="rug-doormat__list rug-list--unstyled">
<li>
<a href="https://www.rug.nl/about-us/" class="rug-doormat__link rug-doormat__link--mobile">Over ons</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/how-to-find-us/" class="rug-doormat__link">Waar vindt u ons</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/work-with-us/job-opportunities/" class="rug-doormat__link">Vacatures</a>
</li>
<li>
<a href="https://www.rug.nl/feb/" class="rug-doormat__link">Faculteit Economie en Bedrijfskunde</a>
</li>
<li>
<a href="https://www.rug.nl/gmw/" class="rug-doormat__link">Faculteit Gedrags- en Maatschappijwetenschappen</a>
</li>
<li>
<a href="https://www.rug.nl/ggw/" class="rug-doormat__link">Faculteit Godgeleerdheid en Godsdienstwetenschap</a>
</li>
<li>
<a href="https://www.rug.nl/let/" class="rug-doormat__link">Faculteit der Letteren</a>
</li>
<li>
<a href="https://www.rug.nl/umcg/" class="rug-doormat__link">Faculteit Medische Wetenschappen</a>
</li>
<li>
<a href="https://www.rug.nl/rechten/" class="rug-doormat__link">Faculteit Rechtsgeleerdheid</a>
</li>
<li>
<a href="https://www.rug.nl/frw/" class="rug-doormat__link">Faculteit Ruimtelijke Wetenschappen</a>
</li>
<li>
<a href="https://www.rug.nl/filosofie/" class="rug-doormat__link">Faculteit Wijsbegeerte</a>
</li>
<li>
<a href="https://www.rug.nl/fse/" class="rug-doormat__link">Faculty of Science and Engineering</a>
</li>
<li>
<a href="https://www.rug.nl/ucg/" class="rug-doormat__link">University College Groningen</a>
</li>
<li>
<a href="https://www.rug.nl/cf/" class="rug-doormat__link">Campus Frysl&acirc;n</a>
</li>
<li>
<a href="https://www.rug.nl/kvi-cart/" class="rug-doormat__link">KVI-CART</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/organization/bureau-of-the-university/" class="rug-doormat__link">Bureau van de Universiteit</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/organization/service-departments/facilitair-bedrijf" class="rug-doormat__link">Facilitair bedrijf</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/organization/bureau-of-the-university/communication" class="rug-doormat__link">Communicatie</a>
</li>
<li>
<a href="https://www.rug.nl/about-us/news-and-events/events/calendar/" class="rug-doormat__link">Agenda</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div data-toggle-group="mainmenu" data-toggle-id="menu-show" data-toggle-class="rug-hidden-m--block" class="rug-doormat rug-background-white rug-pv-l rug-text-center">
<div class="rug-wrapper">
<a class="rug-font-default rug-doormat__metalink" href="https://www.rug.nl/info/disclaimer-copyright">Disclaimer &amp; Copyright</a> <a class="rug-font-default rug-doormat__metalink" href="https://www.rug.nl/info/privacy">Privacy</a> <a class="rug-font-default rug-doormat__metalink" href="https://www.rug.nl/info/cookies">Cookies</a> <a class="rug-font-default rug-doormat__metalink" href="!sso">Inloggen</a>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,11 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Welcome to the RUG Template page" %}{% endblock %}
{% block pagetitle %}{% trans "Welcome to the RUG Template page" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Simple RUG Template" %}</strong>
</p>
<p>{% trans "Some more text" %}</p>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% load i18n %}
<li class="rug-nav--secondary__item">
<a class="rug-nav--secondary__link js--togglable-switch" data-toggle-class="rug-nav--secondary__link--selected" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31" data-toggle-mode="togglable">{% trans "Section" %}</a>
<ul class="rug-nav--secondary__sub rug-nav--secondary__sub--hidden js--togglable-item" data-toggle-class="rug-block" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31">
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.34">
<a class="rug-nav--secondary__sub__link" href="#"><span class="rug-nav--secondary__sub__link-text">{% trans "Menu item" %}</span></a>
</li>
</ul>
</li>

View File

@ -0,0 +1,29 @@
{% load i18n %}
{% if page_obj.paginator.num_pages > 1 %}
<ul class="rug-list--inline" >
{% if page_obj.has_previous %}
{% comment %}
<li class="rug-list--inline__item">
<a href="?page=1" name="page" class="rug-button rug-button--small rug-button--neutral" value="1"><span>«« {% trans "first" %}</span></a>
</li>
{% endcomment %}
<li class="rug-list--inline__item">
<a href="?page={{ page_obj.previous_page_number }}" name="prev" class="rug-button rug-button--small rug-button--neutral" value="« {% trans "previous" %}"><span>« {% trans "previous" %}</span></a>
</li>
{% endif %}
<li class="rug-list--inline__item">
<a name="page" class="rug-button rug-button--small rug-button--secondary" value="{{ page_obj.number }}"><span>{{ page_obj.number }}</span></a>
</li>
{% if page_obj.has_next %}
<li class="rug-list--inline__item">
<a href="?page={{ page_obj.next_page_number }}" name="next" class="rug-button rug-button--small rug-button--neutral" value="{% trans "next" %} »"><span>{% trans "next" %} »</span></a>
</li>
{% comment %}
<li class="rug-list--inline__item">
<a href="?page={{ page_obj.paginator.num_pages }}" name="page" class="rug-button rug-button--small rug-button--neutral" value="{% trans "last" %} »»"><span>{% trans "last" %} »»</span></a>
</li>
{% endcomment %}
{% endif %}
</ul>
{% endif %}

View File

@ -0,0 +1,24 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block pagetitle %}{% trans "Login" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Login" %}</strong>
</p>
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
<table>
{{ form.as_table }}
<tr>
<td colspan="2"><input type="submit" value="{% trans "Login" %}"></td>
</tr>
</table>
</form>
{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">{% trans "Lost password?" %}</a></p>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Password reset complete" %}{% endblock %}
{% block pagetitle %}{% trans "Password reset complete" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Password reset complete" %}</strong>
<br />
<p>Your new password has been set. You can log in now on the <a href="{% url 'login' %}">log in page</a>.</p>
</p>
{% endblock %}

View File

@ -0,0 +1,25 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Set a new password!" %}{% endblock %}
{% block pagetitle %}{% trans "Set a new password!" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Set a new password!" %}</strong>
{% if validlink %}
<form method="POST">
<table>
{% csrf_token %}
{{ form.as_table }}
<tr>
<td>
<input type="submit" value="Change my password">
</td>
</tr>
</table>
</form>
{% else %}
<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
</p>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Reset password, email sent" %}{% endblock %}
{% block pagetitle %}{% trans "Reset password, email sent" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Reset password, email sent" %}</strong>
<br />
<br />
We've emailed you instructions for setting your password. You should receive the email shortly!
</p>
{% endblock %}

View File

@ -0,0 +1,24 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Reset password" %}{% endblock %}
{% block pagetitle %}{% trans "Reset password" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Reset password" %}</strong>
</p>
<form method="post" action="{% url 'password_reset' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.email.label_tag }}</td>
<td>{{ form.email }}</td>
</tr>
</table>
<input type="submit" value="Reset my password">
</form>
{% endblock %}

View File

@ -0,0 +1,20 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Singup" %}{% endblock %}
{% block pagetitle %}{% trans "Singup" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Singup" %}</strong>
</p>
<form method="post" action="{% url 'signup' %}">
{% csrf_token %}
<table>
{{ form.as_table }}
<tr>
<td colspan="2"><input type="submit" value="{% trans "Singup" %}"></td>
</tr>
</table>
</form>
{% endblock %}

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,7 @@
from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index, name='index'),
]

View File

@ -0,0 +1,7 @@
from django.shortcuts import render
# Create your views here.
def index(request):
template_name = 'index.html'
return render(request, template_name, {})

View File

@ -0,0 +1 @@
default_app_config = 'apps.employee.apps.EmployeeConfig'

View File

@ -0,0 +1,20 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
from .models import Employee
# Define an inline admin descriptor for Employee model
# which acts a bit like a singleton
class EmployeeInline(admin.StackedInline):
model = Employee
can_delete = False
verbose_name_plural = 'employee'
# Define a new User admin
class UserAdmin(BaseUserAdmin):
inlines = (EmployeeInline,)
# Re-register UserAdmin
admin.site.unregister(User)
admin.site.register(User, UserAdmin)

View File

@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class EmployeeConfig(AppConfig):
name = 'apps.employee'
label = 'employee'
verbose_name = _('Employee')
verbose_name_plural = _('Employees')

View File

@ -0,0 +1,34 @@
# Generated by Django 3.0.6 on 2020-05-13 13:33
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('polyclinic', '0001_initial'),
('hospital', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Employee',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='The date and time this model has been created', verbose_name='Date created')),
('updated_at', models.DateTimeField(auto_now=True, help_text='The date and time this model has been updated', verbose_name='Date updated')),
('phone', models.CharField(blank=True, help_text='The direct phone number of this employee', max_length=15, verbose_name='Phone number')),
('hospital', models.ForeignKey(help_text='Select the hospital for this employee', on_delete=django.db.models.deletion.CASCADE, to='hospital.Hospital')),
('polyclinic', models.ManyToManyField(blank=True, help_text='Select the polyclinic(s) for this employee', to='polyclinic.Polyclinic')),
('user', models.OneToOneField(help_text='Django user', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
]

View File

@ -0,0 +1,20 @@
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
from lib.models.base import MetaDataModel
from apps.hospital.models import Hospital
from apps.polyclinic.models import Polyclinic
# Create your models here.
class Employee(MetaDataModel):
user = models.OneToOneField(User, on_delete=models.CASCADE, help_text=_('Django user'))
hospital = models.ForeignKey(Hospital, on_delete=models.CASCADE, help_text=_('Select the hospital for this employee'))
polyclinic = models.ManyToManyField(Polyclinic, blank=True, help_text=_('Select the polyclinic(s) for this employee'))
phone = models.CharField(_('Phone number'), max_length=15, blank=True, help_text=_('The direct phone number of this employee'))
def __str__(self):
"""str: Returns a readable name for the hospital. Format is [hospital_name] ([city])."""
return '{} ({})'.format(self.user.get_full_name(), self.hospital)

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -0,0 +1 @@
default_app_config = 'apps.hospital.apps.HospitalConfig'

View File

@ -0,0 +1,10 @@
from django.contrib import admin
from .models import Hospital
# Register your models here.
@admin.register(Hospital)
class HospitalAdmin(admin.ModelAdmin):
list_display = ('name', 'address', 'postal_code', 'city', 'phone', 'created_at')
ordering = ('name', 'city', 'created_at','updated_at')
search_fields = ('name', 'address','postal_code','city', 'phone')

View File

@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class HospitalConfig(AppConfig):
name = 'apps.hospital'
label = 'hospital'
verbose_name = _('Hospital')
verbose_name_plural = _('Hospitals')

View File

@ -0,0 +1,30 @@
# Generated by Django 3.0.6 on 2020-05-13 13:33
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Hospital',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='The date and time this model has been created', verbose_name='Date created')),
('updated_at', models.DateTimeField(auto_now=True, help_text='The date and time this model has been updated', verbose_name='Date updated')),
('name', models.CharField(help_text='The name of this hospital', max_length=200, verbose_name='Name')),
('address', models.CharField(blank=True, help_text='The address of this hospital', max_length=200, verbose_name='Address')),
('postal_code', models.CharField(blank=True, help_text='The postal code of this hospital', max_length=10, verbose_name='Postal code')),
('city', models.CharField(blank=True, help_text='The city of this hospital', max_length=60, verbose_name='City')),
('phone', models.CharField(blank=True, help_text='The general phone number of this hospital', max_length=18, verbose_name='Phone number')),
],
options={
'abstract': False,
},
),
]

View File

@ -0,0 +1,16 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from lib.models.base import MetaDataModel
# Create your models here.
class Hospital(MetaDataModel):
name = models.CharField(_('Name'), max_length=200, help_text=_('The name of this hospital'))
address = models.CharField(_('Address'), max_length=200, blank=True, help_text=_('The address of this hospital'))
postal_code = models.CharField(_('Postal code'), max_length=10, blank=True, help_text=_('The postal code of this hospital'))
city = models.CharField(_('City'), max_length=60, blank=True, help_text=_('The city of this hospital'))
phone = models.CharField(_('Phone number'), max_length=18, blank=True, help_text=_('The general phone number of this hospital'))
def __str__(self):
"""str: Returns a readable name for the hospital. Format is [hospital_name] ([city])."""
return '{}{}'.format(self.name, ('' if not self.city else ' ({})'.format(self.city)))

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -0,0 +1 @@
default_app_config = 'apps.polyclinic.apps.PolyclinicConfig'

View File

@ -0,0 +1,10 @@
from django.contrib import admin
from .models import Polyclinic
# Register your models here.
@admin.register(Polyclinic)
class PolyclinicAdmin(admin.ModelAdmin):
list_display = ('name', 'phone', 'created_at')
ordering = ('name', 'created_at','updated_at')
search_fields = ('name', 'phone')

View File

@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class PolyclinicConfig(AppConfig):
name = 'apps.polyclinic'
label = 'polyclinic'
verbose_name = _('Polyclinic')
verbose_name_plural = _('Polyclinics')

View File

@ -0,0 +1,30 @@
# Generated by Django 3.0.6 on 2020-05-13 13:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('hospital', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Polyclinic',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='The date and time this model has been created', verbose_name='Date created')),
('updated_at', models.DateTimeField(auto_now=True, help_text='The date and time this model has been updated', verbose_name='Date updated')),
('name', models.CharField(blank=True, help_text='The name of this polyclinic', max_length=200, verbose_name='Name')),
('phone', models.CharField(blank=True, help_text='The general/direct phone number of this polyclinic', max_length=18, verbose_name='Phone number')),
('hospital', models.ForeignKey(help_text='To which hospital belongs this polyclinic', on_delete=django.db.models.deletion.CASCADE, to='hospital.Hospital')),
],
options={
'abstract': False,
},
),
]

View File

@ -0,0 +1,15 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from lib.models.base import MetaDataModel
from apps.hospital.models import Hospital
# Create your models here.
class Polyclinic(MetaDataModel):
hospital = models.ForeignKey(Hospital, on_delete=models.CASCADE, help_text=_('To which hospital belongs this polyclinic'))
name = models.CharField(_('Name'), max_length=200, blank=True, help_text=_('The name of this polyclinic'))
phone = models.CharField(_('Phone number'), max_length=18, blank=True, help_text=_('The general/direct phone number of this polyclinic'))
def __str__(self):
"""str: Returns a readable name for the hospital. Format is [hospital_name] ([city])."""
return '{} ({})'.format(self.name, self.hospital)

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -0,0 +1 @@
default_app_config = 'apps.schedule.apps.ScheduleConfig'

View File

@ -0,0 +1,15 @@
from django.contrib import admin
from .models import Schedule
# Register your models here.
@admin.register(Schedule)
class ScheduleAdmin(admin.ModelAdmin):
list_display = ('name', 'employee', 'email', 'created_at', 'processed')
ordering = ('name', 'created_at')
search_fields = ('name', 'email')
def processed(self,obj):
return len(obj.output_peregrine) > 0
processed.boolean = True

View File

@ -0,0 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class ScheduleConfig(AppConfig):
name = 'apps.schedule'
label = 'schedule'
verbose_name = _('Schedule')
verbose_name_plural = _('Schedules')

View File

@ -0,0 +1,9 @@
from django import forms
from django.utils.translation import gettext_lazy as _
from .models import Schedule
class ScheduleForm(forms.Form):
name = forms.CharField(label=_('Department name'), help_text=_('Enter a descriptive name for this schedule'), max_length=100)
email = forms.CharField(label=_('Email address for results'), help_text=_('When the job is done, the results will be sent to this email address'), max_length=100)
json = forms.CharField(label=_('Email address for results'), help_text=_('When the job is done, the results will be sent to this email address'), widget=forms.HiddenInput(), strip=True)

View File

@ -0,0 +1,36 @@
# Generated by Django 3.0.6 on 2020-05-13 13:33
import collections
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('employee', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Schedule',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='The date and time this model has been created', verbose_name='Date created')),
('updated_at', models.DateTimeField(auto_now=True, help_text='The date and time this model has been updated', verbose_name='Date updated')),
('name', models.CharField(help_text='Name of the schedule', max_length=100, verbose_name='Name')),
('email', models.CharField(help_text='Email address where the results will be sent to.', max_length=100, verbose_name='Email address')),
('planning_source', jsonfield.fields.JSONField(blank=True, help_text='The schedule input in JSON format based on the form data', load_kwargs={'object_pairs_hook': collections.OrderedDict}, verbose_name='Schedule input')),
('planning_peregrine', models.TextField(blank=True, help_text='This is the translated content from the source for use with Peregrine cluster', verbose_name='Peregrine input')),
('peregrine_accepted', models.BooleanField(default=False, help_text='When true, the Peregrine cluster has picked up the job.', verbose_name='Peregrine accepted')),
('output_peregrine', models.BinaryField(blank=True, help_text='This is the output in binary format from the Peregrine cluster', verbose_name='Peregrine binary output')),
('employee', models.ForeignKey(help_text='Select the employee that is responsible for this schedule request', on_delete=django.db.models.deletion.CASCADE, to='employee.Employee')),
],
options={
'abstract': False,
},
),
]

View File

@ -0,0 +1,26 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
from lib.models.base import MetaDataModel
from apps.employee.models import Employee
from jsonfield import JSONField
import collections
# Create your models here.
class Schedule(MetaDataModel):
employee = models.ForeignKey(Employee, on_delete=models.CASCADE, help_text=_('Select the employee that is responsible for this schedule request'))
name = models.CharField(_('Name'), max_length=100, help_text=_('Name of the schedule'))
email = models.CharField(_('Email address'), max_length=100, help_text=_('Email address where the results will be sent to.'))
planning_source = JSONField(_('Schedule input'), blank=True, load_kwargs={'object_pairs_hook': collections.OrderedDict}, help_text=_('The schedule input in JSON format based on the form data'))
planning_peregrine = models.TextField(_('Peregrine input'), blank=True, help_text=_('This is the translated content from the source for use with Peregrine cluster'))
peregrine_accepted = models.BooleanField(_('Peregrine accepted'),default=False, help_text=_('When true, the Peregrine cluster has picked up the job.'))
output_peregrine = models.BinaryField(_('Peregrine binary output'), blank=True, help_text=_('This is the output in binary format from the Peregrine cluster'))
def __str__(self):
"""str: Returns a readable name for the schedule. Format is [schedule_name] (employee_name)."""
return '{} ({})'.format(self.name, self.employee)

View File

@ -0,0 +1,37 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Schedules overview list" %}{% endblock %}
{% block pagetitle %}{% trans "Schedules overview list" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Schedules overview list" %}</strong>
<table>
<tr>
{% comment %} <th>{% trans "Department" %}</th> {% endcomment %}
<th>{% trans "Name" %}</th>
<th>{% trans "Created" %}</th>
<th>{% trans "Updated" %}</th>
<th>{% trans "Running" %}</th>
<th>{% trans "Report" %}</th>
</tr>
{% for schedule in object_list %}
<tr>
{% comment %} <td><span>{{ schedule.name }}</span></td> {% endcomment %}
<td>{% comment %}<a href="{% url 'schedule:detail' pk=schedule.id %}">{% endcomment %}{{ schedule.name }}{% comment %}</a>{% endcomment %}</td>
<td>{{ schedule.created_at|date:"SHORT_DATETIME_FORMAT" }}</td>
<td>{{ schedule.updated_at|date:"SHORT_DATETIME_FORMAT" }}</td>
<td>None</td>
<td>None</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="rug-text-center">{% trans "No schedules available" %}</td>
</tr>
{% endfor %}
</table>
<br />
<br />
{% include "pager.html" %}
</p>
{% endblock %}

View File

@ -0,0 +1,650 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "New schedule" %}{% endblock %}
{% block pagetitle %}{% trans "New schedule" %}{% endblock %}
{% block content %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<div class="container">
<form method="POST" action="{% url 'schedule:new' %}">
{% csrf_token %}
{{ form.json }}
<h1>Algemene informatie</h1>
<p>Als een afdeling meerdere wachtkamers heeft, vul dan dit formulier meerdere keren in; een keer voor elke groep van behandelkamers die een wachtkamer delen.</p>
<div class="form-group">
<label for="id_name">Naam van de afdeling</label>
<input type="text" class="form-control" id="id_name" name="name" aria-describedby="afdelingnaamHelp" required>
<small id="afdelingnaamHelp" class="form-text text-muted">Geef de naam op van de afdeling</small>
</div>
<div class="form-group">
<label for="id_email">Emailadres voor de resultaten</label>
<input type="email" class="form-control" id="id_email" name="email" aria-describedby="emailadresHelp" required value={{user.email}}>
<small id="emailadresHelp" class="form-text text-muted">Geef het emailadres op om de uitkomsten te ontvangen</small>
</div>
<div class="form-group">
<label for="patienten">Aantal patiënten dat kan wachten in wachtkamer</label>
<input type="number" class="form-control" id="patienten" name="patienten" min="1" max="100" aria-describedby="patientenHelp" required>
<small id="patientenHelp" class="form-text text-muted">Met bewaren 1,5m afstand tussen lopende en zittende patiënten!</small>
</div>
<br />
<hr>
<br />
<h1>Specialisaties binnen de afdeling</h1>
<div class="poliekliniek_specialisatie">
<div class="form-group">
<label for="specialisatie_1" class="h4">Specialisatie 1</label>
<input type="text" class="form-control" style="font-size: 1.5em" id="specialisatie_1" name="specialisatie_1" aria-describedby="specialisatie_1Help" required>
<small id="specialisatie_1Help" class="form-text text-muted float-right d-none"><a href="#">Verwijder</a></small>
</div>
<div class="form-group">
<label for="specialisatie_afkorting_1">Specialisatie afkorting</label>
<input type="text" class="form-control" maxlength="5" id="specialisatie_afkorting_1" name="specialisatie_afkorting_1" aria-describedby="specialisatie_afkorting_1Help" required>
<small id="specialisatie_1Help" class="form-text text-muted">Geef een afkorting op voor deze specialisatie. Deze gebruiken wij in de figuren van de rapportage.</small>
</div>
<div class="form-group">
<label for="specialisatie_aantal_artsen_1">Aantal artsen</label>
<input type="number" class="form-control" min="0" max="100" id="specialisatie_aantal_artsen_1" name="specialisatie_aantal_artsen_1" aria-describedby="specialisatie_aantal_artsen_1Help" required>
<small id="specialisatie_aantal_artsen_1Help" class="form-text text-muted">Maximaal aantal artsen dat op enig moment tegelijk aan het werk zou kunnen zijn.</small>
</div>
<div class="form-group">
<label for="specialisatie_aantal_kamers_1">Aantal behandelkamers</label>
<input type="number" class="form-control" min="0" max="100" id="specialisatie_aantal_kamers_1" name="specialisatie_aantal_kamers_1" aria-describedby="specialisatie_aantal_kamers_1Help" required>
<small id="specialisatie_aantal_kamers_1Help" class="form-text text-muted">Aantal behandelkamers dat beschikbaar is per specialisatie</small>
</div>
<div class="form-group">
<label for="specialisatie_aantal_behandelingen_1">Aantal verschillende soorten behandelingen</label>
<input type="number" class="form-control" min="0" max="100" id="specialisatie_aantal_behandelingen_1" name="specialisatie_aantal_behandelingen_1" aria-describedby="specialisatie_aantal_behandelingen_1Help" required>
<small id="specialisatie_aantal_behandelingen_1Help" class="form-text text-muted"></small>
</div>
<div class="form-group werktijden">
<label>Werktijden <small class="text-danger" style="display:none"> Nog niet volledig</small></label>
<div class="container ml-4">
<div class="row">
<div class="col-sm-6">de hele werkdag</div>
<div class="col-sm-3">
<select class="form-control" id="werkdag_start_afdeling_1" name="werkdag_start_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0600">06:00</option>
<option value="0615">06:15</option>
<option value="0630">06:30</option>
<option value="0645">06:45</option>
<option value="0700">07:00</option>
<option value="0715">07:15</option>
<option value="0730">07:30</option>
<option value="0745">07:45</option>
<option value="0800">08:00</option>
<option value="0815">08:15</option>
<option value="0830">08:30</option>
<option value="0845">08:45</option>
<option value="0900">09:00</option>
<option value="0915">09:15</option>
<option value="0930">09:30</option>
<option value="0945">09:45</option>
<option value="1000">10:00</option>
</select>
</div>
<div class="col-sm-3">
<select class="form-control" id="werkdag_end_afdeling_1" name="werkdag_end_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="1200">12:00</option>
<option value="1215">12:15</option>
<option value="1230">12:30</option>
<option value="1245">12:45</option>
<option value="1300">13:00</option>
<option value="1315">13:15</option>
<option value="1330">13:30</option>
<option value="1345">13:45</option>
<option value="1400">14:00</option>
<option value="1415">14:15</option>
<option value="1430">14:30</option>
<option value="1445">14:45</option>
<option value="1500">15:00</option>
<option value="1515">15:15</option>
<option value="1530">15:30</option>
<option value="1545">15:45</option>
<option value="1600">16:00</option>
<option value="1615">16:15</option>
<option value="1630">16:30</option>
<option value="1645">16:45</option>
<option value="1700">17:00</option>
<option value="1715">17:15</option>
<option value="1720">17:30</option>
<option value="1745">17:45</option>
<option value="1800">18:00</option>
<option value="1815">18:15</option>
<option value="1830">18:30</option>
<option value="1845">18:45</option>
<option value="1900">19:00</option>
<option value="1915">19:15</option>
<option value="1930">19:30</option>
<option value="1945">19:45</option>
<option value="2000">20:00</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6">ochtendpauze</div>
<div class="col-sm-3">
<select class="form-control" id="ochtend_pauze_start_afdeling_1" name="ochtend_pauze_start_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="0900">09:00</option>
<option value="0915">09:15</option>
<option value="0930">09:30</option>
<option value="0945">09:45</option>
<option value="1000">10:00</option>
<option value="1015">10:15</option>
<option value="1030">10:30</option>
<option value="1045">10:45</option>
<option value="1100">11:00</option>
</select>
</div>
<div class="col-sm-3">
<select class="form-control" id="ochtend_pauze_end_afdeling_1" name="ochtend_pauze_end_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="0915">09:15</option>
<option value="0930">09:30</option>
<option value="0945">09:45</option>
<option value="1000">10:00</option>
<option value="1015">10:15</option>
<option value="1030">10:30</option>
<option value="1045">10:45</option>
<option value="1100">11:00</option>
<option value="1115">11:15</option>
<option value="1130">11:30</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6">lunchpauze</div>
<div class="col-sm-3">
<select class="form-control" id="lunch_pauze_start_afdeling_1" name="lunch_pauze_start_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="1130">11:30</option>
<option value="1145">11:45</option>
<option value="1200">12:00</option>
<option value="1215">12:15</option>
<option value="1230">12:30</option>
<option value="1245">12:45</option>
<option value="1300">13:00</option>
<option value="1315">13:15</option>
<option value="1330">13:30</option>
<option value="1345">13:45</option>
<option value="1400">14:00</option>
</select>
</div>
<div class="col-sm-3">
<select class="form-control" id="lunch_pauze_end_afdeling_1" name="lunch_pauze_end_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="1200">12:00</option>
<option value="1215">12:15</option>
<option value="1230">12:30</option>
<option value="1245">12:45</option>
<option value="1300">13:00</option>
<option value="1315">13:15</option>
<option value="1330">13:30</option>
<option value="1345">13:45</option>
<option value="1400">14:00</option>
<option value="1415">14:15</option>
<option value="1430">14:30</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6">middagpauze</div>
<div class="col-sm-3">
<select class="form-control" id="middag_pauze_start_afdeling_1" name="middag_pauze_start_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="1430">14:30</option>
<option value="1445">14:45</option>
<option value="1500">15:00</option>
<option value="1515">15:15</option>
<option value="1530">15:30</option>
<option value="1545">15:45</option>
<option value="1600">16:00</option>
</select>
</div>
<div class="col-sm-3">
<select class="form-control" id="middag_pauze_end_afdeling_1" name="middag_pauze_end_afdeling_1" required>
<option value="">Maak een keuze</option>
<option value="0">Geen pauze</option>
<option value="1445">14:45</option>
<option value="1500">15:00</option>
<option value="1515">15:15</option>
<option value="1530">15:30</option>
<option value="1545">15:45</option>
<option value="1600">16:00</option>
<option value="1615">16:15</option>
<option value="1630">16:30</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="text-center mt-4 font-weight-bold"><a href="#" class="add_specialisatie">klik hier om een extra specialisatie toe te voegen</a></div>
<br />
<hr>
<br />
<h1>Behandelingen</h1>
<p>In het model worden slots van 5 minuten gebruikt voor het bepalen van starttijden. etc. Afspraken starten daarmee om bijv. 10.00, 10.05, 10.10.<br />Afspraakduur wordt daarmee ook in veelvouden van 5 minuten gevraagd.</p>
<p>Zowel afspraken waar de patiënt fysiek in het ziekenhuis is, als wel telefoongesprekken worden hier gevraagd. Beide type afspraken kunnen in het raster worden gepland.</p>
<p>"Normaal" betekent: zoals het was voor COVID-19<br />30% betekent: als je maar 30% van de patiënten kunt binnenkrijgen, hoeveel afspraken van elk type zou je dan willen inplannen?</p>
<div class="container">
<div class="row mb-2">
<div class="col"><strong>Naam behandeling</strong></div>
<div class="col"><strong>Duur (in minuten)</strong></div>
<div class="col"><strong>Specialisatie</strong></div>
<div class="col"><strong>Methode</strong></div>
<div class="col"><strong>Normaal aantal</strong></div>
<div class="col"><strong>Gewenst als op 30%</strong></div>
</div>
<div class="row behandeling">
<div class="col">
<div class="form-group">
<input type="text" class="form-control" id="behandeling_1" name="behandeling_1" required>
</div>
</div>
<div class="col">
<div class="form-group">
<select class="form-control" id="behandeling_durartion_1" name="behandeling_durartion_1" required>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="25">25</option>
<option value="30">30</option>
<option value="35">35</option>
<option value="40">40</option>
<option value="45">45</option>
<option value="50">50</option>
<option value="55">55</option>
<option value="60">60</option>
<option value="65">65</option>
<option value="70">70</option>
<option value="75">75</option>
<option value="80">80</option>
<option value="85">85</option>
<option value="90">90</option>
</select>
</div>
</div>
<div class="col">
<div class="form-group">
<select class="form-control specialismes" id="behandeling_specialisme_1" name="behandeling_specialisme_1" required></select>
</div>
</div>
<div class="col">
<div class="form-group">
<select class="form-control" id="behandeling_method_1" name="behandeling_method_1" required>
<option value="live">in persoon</option>
<option value="phone">telefonisch</option>
</select>
</div>
</div>
<div class="col">
<div class="form-group">
<input type="number" class="form-control behandeling_calc" id="behandeling_100p_1" name="behandeling_100p_1" min="0" max="100" required>
</div>
</div>
<div class="col">
<div class="form-group">
<input type="number" class="form-control behandeling_calc" id="behandeling_30p_1" name="behandeling_30p_1" min="0" max="100" required>
<small class="form-text text-muted float-right d-none"><a href="#">Verwijder</a></small>
</div>
</div>
</div>
</div>
<div class="text-center mt-4 font-weight-bold"><a href="#" class="add_behandeling">klik hier om een nieuwe behandeling toe te voegen</a></div>
<div class="row behandeling_calc_summary">
<div class="col-8"><strong>Totaal aantal afspraken</strong></div>
<div class="col-2 text-center">0</div>
<div class="col-2 text-center">0</div>
</div>
<div class="row behandeling_calc_remarks">
<div class="col-12"></div>
</div>
<br />
<hr>
<br />
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<!--
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.1-muted 6.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script type="text/javascript">
function addSpecialisatie() {
var clone = jQuery('div.poliekliniek_specialisatie:first').clone()
clone.find('input').val('');
clone.find('small').removeClass('d-none');
clone.insertAfter('div.poliekliniek_specialisatie:last');
updateSpecialisaties();
loadRemoveSpecialisatie();
}
function loadRemoveSpecialisatie() {
jQuery('div.poliekliniek_specialisatie small a').off('click').on('click',function(event){
event.preventDefault();
jQuery(this).parentsUntil('.poliekliniek_specialisatie').parent().remove();
updateSpecialisaties();
updateSpecialisatieValues();
});
}
function updateSpecialisaties() {
jQuery('div.poliekliniek_specialisatie').each(function(counter,element){
if (counter > 0) {
element = jQuery(element);
var nr = counter + 1;
element.find('label').first().text('Specialisatie ' + nr);
element.find('select,input').each(function(index,selectitem){
selectitem = jQuery(selectitem);
selectitem.prop('name',selectitem.prop('name').replace(/_\d+$/,'_' + nr));
selectitem.prop('id',selectitem.prop('id').replace(/_\d+$/,'_' + nr));
if (selectitem.attr('aria-describedby')) {
selectitem.attr('aria-describedby',selectitem.attr('aria-describedby').replace(/_\d+Help$/,'_' + nr + 'Help'));
}
});
}
});
jQuery('div.poliekliniek_specialisatie input').off('change').on('change',function(){
updateSpecialisatieValues();
});
}
function updateSpecialisatieValues() {
var specialismes = [];
jQuery('div.poliekliniek_specialisatie').each(function(){
specialismes.push(jQuery('input:first',this).val());
});
jQuery('select.specialismes').each(function(counter,element){
element = jQuery(element);
let selected_index = element[0].selectedIndex;
element.find('option').remove();
jQuery.each(specialismes,function(index,item) {
element.append(jQuery('<option>').val(item).text(item));
});
if (selected_index > -1) {
element[0].selectedIndex = selected_index;
}
});
}
function addBehandelkamer() {
var clone = jQuery('div.row.behandelkamer:first').clone()
clone.find('input').val('');
clone.find('selected').val('');
clone.find('small').removeClass('d-none');
clone.insertAfter('div.row.behandelkamer:last');
updateBehandelkamers();
loadRemoveBehandelkamer();
}
function loadRemoveBehandelkamer() {
jQuery('div.behandelkamer small a').off('click').on('click',function(event){
event.preventDefault();
jQuery(this).parentsUntil('.behandelkamer').parent().remove();
updateBehandelkamers();
});
}
function updateBehandelkamers() {
jQuery('div.behandelkamer').each(function(counter,element){
if (counter > 0) {
element = jQuery(element);
var nr = counter + 1;
element.find('input').prop('id','behandelkamer_' + nr);
element.find('input').prop('name','behandelkamer_' + nr);
element.find('select').prop('id','behandelkamer_specialisme_' + nr);
element.find('select').prop('name','behandelkamer_specialisme_' + nr);
}
});
}
function addBehandeling() {
var clone = jQuery('div.row.behandeling:first').clone()
clone.find('input').val('');
clone.find('selected').val('');
clone.find('small').removeClass('d-none');
clone.insertAfter('div.row.behandeling:last');
jQuery('input.behandeling_calc').off('change keyup').on('change keyup',function(){
calculateBehandelingen();
});
updateBehandelingen();
loadRemoveBehandeling();
}
function loadRemoveBehandeling() {
jQuery('div.behandeling small a').off('click').on('click',function(event){
event.preventDefault();
jQuery(this).parentsUntil('.behandeling').parent().remove();
updateBehandelingen();
});
}
function updateBehandelingen() {
jQuery('div.behandeling').each(function(counter,element){
if (counter > 0) {
element = jQuery(element);
var nr = counter + 1;
element.find('select,input').each(function(index,selectitem){
selectitem = jQuery(selectitem);
selectitem.prop('name',selectitem.prop('name').replace(/_\d+$/,'_' + nr));
selectitem.prop('id',selectitem.prop('id').replace(/_\d+$/,'_' + nr));
});
}
});
}
function calculateBehandelingen() {
let total = 0, percentage = 0;
let ok = true;
jQuery('div.row.behandeling').each(function(counter,row){
row = jQuery(row);
total += (row.find('input[name*="_100p_"]').val() != '' ? row.find('input[name*="_100p_"]').val() * 1 : 0);
percentage += (row.find('input[name*="_30p_"]').val() != '' ? row.find('input[name*="_30p_"]').val() * 1 : 0);
});
jQuery('div.row.behandeling_calc_summary div:nth-child(2)').text(total);
jQuery('div.row.behandeling_calc_summary div:nth-child(3)').text(percentage);
let calc_message = '';
let class_message = '';
if (percentage > (total * 0.3)) {
calc_message = 'U heeft teveel afspraken geselecteerd voor het 30% scenario';
class_message = 'alert-danger';
ok = false;
} else if ((total * 0.3) - percentage >= 1) {
calc_message = 'U kunt meer afspraken toevoegen voor het 30% scenario';
class_message = 'alert-warning';
} else {
calc_message = 'Dit klopt precies';
class_message = 'alert-success';
}
jQuery('div.behandeling_calc_remarks div').removeClass('alert-danger alert-warning alert-success').addClass(class_message).text(calc_message);
return ok;
}
function validate_working_hours() {
jQuery('div.form-group.werktijden').each(function(index,element){
jQuery(element).find('select').removeClass('is-invalid');
check_working_hours(element,true);
jQuery(element).find('select').filter(function(){ let value = jQuery(this).val(); return !(value != null && value != '') }).addClass('is-invalid');
})
return jQuery('small.text-danger:visible').length == 0;
}
function check_working_hours(html, showerror) {
html = jQuery(html).parentsUntil('.werktijden').parent();
html = jQuery(html[0]);
let day_start = html.find('select[name^="werkdag_start_afdeling_"]');
let day_end = html.find('select[name^="werkdag_end_afdeling_"]');
let morning_break_start = html.find('select[name^="ochtend_pauze_start_afdeling_"]');
let morning_break_end = html.find('select[name^="ochtend_pauze_end_afdeling_"]');
let lunch_start = html.find('select[name^="lunch_pauze_start_afdeling_"]');
let lunch_end = html.find('select[name^="lunch_pauze_end_afdeling_"]');
let afternoon_break_start = html.find('select[name^="middag_pauze_start_afdeling_"]');
let afternoon_break_end = html.find('select[name^="middag_pauze_end_afdeling_"]');
morning_break_start.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
let time = day_start.val();
element.disabled = (time && element.value < day_start.val()) || (day_end.val() && element.value >= day_end.val());
}
});
morning_break_end.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
// Or when morning_break_start is selected and valid, add period time for end time selections
let time = ('' != morning_break_start.val() ? morning_break_start.val() : day_start.val());
element.disabled = (time && element.value <= time) || (day_end.val() && element.value > day_end.val());
}
});
lunch_start.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
// Or when morning_break_end is selected and valid, add period time for end time selections
let time = ('' != morning_break_end.val() ? morning_break_end.val() : day_start.val());
element.disabled = (time && element.value < time) || (day_end.val() && element.value >= day_end.val());
}
});
lunch_end.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
// Or when lunch_start is selected and valid, add period time for end time selections
let time = ('' != lunch_start.val() ? lunch_start.val() : day_start.val()) * 1;
element.disabled = (time && element.value <= time) || (day_end.val() && element.value > day_end.val());
}
});
afternoon_break_start.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
// Or when lunch_end is selected and valid, add period time for end time selections
let time = ('' != lunch_end.val() ? lunch_end.val() : day_start.val());
element.disabled = (time && element.value < time) || (day_end.val() && element.value >= day_end.val());
}
});
afternoon_break_end.find('option').each(function(index,element){
if ('' !== element.value && element.value > 0) {
// Only allow options that are between the day start and day end.
// Or when morning_break_start is selected and valid, add period time for end time selections
let time = ('' != afternoon_break_start.val() ? afternoon_break_start.val() : day_start.val());
element.disabled = (time && element.value <= time) || (day_end.val() && element.value > day_end.val());
}
});
if (showerror) {
html.find('small.text-danger').toggle(day_start.val() == '' || day_start.val() == null ||
day_end.val() == '' || day_end.val() == null ||
morning_break_start.val() == '' || morning_break_start.val() == null ||
morning_break_end.val() == '' || morning_break_end.val() == null ||
lunch_start.val() == '' || lunch_start.val() == null ||
lunch_end.val() == '' || lunch_end.val() == null ||
afternoon_break_start.val() == '' || afternoon_break_start.val() == null ||
afternoon_break_end.val() == '' || afternoon_break_end.val() == null);
}
}
jQuery(function() {
jQuery('a.add_specialisatie').on('click',function(event){
event.preventDefault();
addSpecialisatie();
});
jQuery('div.poliekliniek_specialisatie input').off('change').on('change',function(){
updateSpecialisatieValues();
});
jQuery('a.add_behandelkamer').on('click',function(event){
event.preventDefault();
addBehandelkamer();
});
jQuery('a.add_behandeling').on('click',function(event){
event.preventDefault();
addBehandeling();
});
jQuery('div.form-group.werktijden select').off('change').on('change',function(event){
check_working_hours(this);
});
jQuery('input.behandeling_calc').off('change keyup').on('change keyup',function(event){
calculateBehandelingen();
});
jQuery('form').on('submit',function(event){
//event.preventDefault();
if (validate_working_hours() &&
calculateBehandelingen()) {
let formdata = new FormData(this);
formdata.delete('csrfmiddlewaretoken');
formdata.delete('json');
jQuery('input#id_json').val(JSON.stringify(Object.fromEntries(formdata)));
// alert('Alle velden zijn ok! Formulier wordt nu verder verwerkt.');
console.log(event);
return true;
} else {
alert('Er zijn wat problemen met het formulier. Controleer de invoer velden');
}
return true;
});
});
</script>
</body>
{% endblock %}

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,9 @@
from django.urls import path, include
from . import views
app_name = 'schedule'
urlpatterns = [
path('', views.ScheduleListView.as_view(), name='list'),
path('new', views.new_or_update_study, name='new'),
]

View File

@ -0,0 +1,50 @@
from django.shortcuts import render, redirect
from django.views.generic.list import ListView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.decorators import login_required
from .models import Schedule
from .forms import ScheduleForm
import json
# Create your views here.
class ScheduleListView(LoginRequiredMixin,ListView):
model = Schedule
paginate_by = 10
def get_queryset(self):
return Schedule.objects.filter(employee=self.request.user.employee).order_by('-created_at')
@login_required
def new_or_update_study(request, schedule = None):
template_name = 'schedule/schedule_new.html'
if request.method == 'POST':
schedule_form = ScheduleForm(request.POST)
if schedule_form.is_valid():
new_schedule = Schedule()
try:
new_schedule.planning_source = json.loads(schedule_form.cleaned_data['json'])
except json.JSONDecodeError as ex:
# For now, sorry, ignore
pass
new_schedule.employee = request.user.employee
new_schedule.name = schedule_form.cleaned_data['name']
new_schedule.email = schedule_form.cleaned_data['email']
new_schedule.save()
return redirect('schedule:list')
else:
schedule_form = ScheduleForm()
return render(request, template_name, {
'form' : schedule_form,
})

View File

@ -0,0 +1,20 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
class MetaDataModel(models.Model):
"""
This is an abstract model with some general meta fields.
Attributes
----------
created_at : datetime
The date and time when the model has been created. This will be automatically set once during creating.
updated_at : datetime
The date and time when the model has been updated. This will be automatically updated when the model is updated.
"""
created_at = models.DateTimeField(_('Date created'),auto_now_add=True, help_text=_('The date and time this model has been created'))
updated_at = models.DateTimeField(_('Date updated'),auto_now=True, help_text=_('The date and time this model has been updated'))
class Meta:
abstract = True

View File

@ -0,0 +1,318 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-13 08:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/RUG_template/apps.py:7 apps/RUG_template/apps.py:8
msgid "RUG_template"
msgstr ""
#: apps/RUG_template/templates/base.html:7
msgid "Welcome at RUG Data drop"
msgstr ""
#: apps/RUG_template/templates/base.html:84
msgid "Language selection"
msgstr ""
#: apps/RUG_template/templates/index.html:4
#: apps/RUG_template/templates/index.html:5
msgid "Welcome to the RUG Template page"
msgstr ""
#: apps/RUG_template/templates/index.html:8
msgid "Simple RUG Template"
msgstr ""
#: apps/RUG_template/templates/index.html:10
msgid "Some more text"
msgstr ""
#: apps/RUG_template/templates/menu.html:4
msgid "Section"
msgstr ""
#: apps/RUG_template/templates/menu.html:9
msgid "Menu item"
msgstr ""
#: apps/RUG_template/templates/pager.html:13
msgid "previous"
msgstr ""
#: apps/RUG_template/templates/pager.html:21
msgid "next"
msgstr ""
#: apps/RUG_template/templates/registration/login.html:4
#: apps/RUG_template/templates/registration/login.html:5
#: apps/RUG_template/templates/registration/login.html:8
msgid "Login"
msgstr ""
#: apps/RUG_template/templates/registration/login.html:23
msgid "Lost password?"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_complete.html:4
#: apps/RUG_template/templates/registration/password_reset_complete.html:5
#: apps/RUG_template/templates/registration/password_reset_complete.html:8
msgid "Password reset complete"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_confirm.html:4
#: apps/RUG_template/templates/registration/password_reset_confirm.html:5
#: apps/RUG_template/templates/registration/password_reset_confirm.html:8
msgid "Set a new password!"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_confirm.html:24
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_done.html:4
#: apps/RUG_template/templates/registration/password_reset_done.html:5
#: apps/RUG_template/templates/registration/password_reset_done.html:8
msgid "Reset password, email sent"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_form.html:4
#: apps/RUG_template/templates/registration/password_reset_form.html:5
#: apps/RUG_template/templates/registration/password_reset_form.html:8
msgid "Reset password"
msgstr ""
#: apps/employee/apps.py:7
msgid "Employee"
msgstr ""
#: apps/employee/apps.py:8
msgid "Employees"
msgstr ""
#: apps/employee/models.py:11
msgid "Django user"
msgstr ""
#: apps/employee/models.py:13
msgid "Select the hospital for this employee"
msgstr ""
#: apps/employee/models.py:15
msgid "Select the polyclinic(s) for this employee"
msgstr ""
#: apps/employee/models.py:16 apps/hospital/models.py:12
#: apps/polyclinic/models.py:11
msgid "Phone number"
msgstr ""
#: apps/employee/models.py:16
msgid "The direct phone number of this employee"
msgstr ""
#: apps/hospital/apps.py:7
msgid "Hospital"
msgstr ""
#: apps/hospital/apps.py:8
msgid "Hospitals"
msgstr ""
#: apps/hospital/models.py:8 apps/polyclinic/models.py:10
#: apps/schedule/models.py:14
#: apps/schedule/templates/schedule/schedule_list.html:12
msgid "Name"
msgstr ""
#: apps/hospital/models.py:8
msgid "The name of this hospital"
msgstr ""
#: apps/hospital/models.py:9
msgid "Address"
msgstr ""
#: apps/hospital/models.py:9
msgid "The address of this hospital"
msgstr ""
#: apps/hospital/models.py:10
msgid "Postal code"
msgstr ""
#: apps/hospital/models.py:10
msgid "The postal code of this hospital"
msgstr ""
#: apps/hospital/models.py:11
msgid "City"
msgstr ""
#: apps/hospital/models.py:11
msgid "The city of this hospital"
msgstr ""
#: apps/hospital/models.py:12
msgid "The general phone number of this hospital"
msgstr ""
#: apps/polyclinic/apps.py:7
msgid "Polyclinic"
msgstr ""
#: apps/polyclinic/apps.py:8
msgid "Polyclinics"
msgstr ""
#: apps/polyclinic/models.py:9
msgid "To which hospital belongs this polyclinic"
msgstr ""
#: apps/polyclinic/models.py:10
msgid "The name of this polyclinic"
msgstr ""
#: apps/polyclinic/models.py:11
msgid "The general/direct phone number of this polyclinic"
msgstr ""
#: apps/schedule/apps.py:7
msgid "Schedule"
msgstr ""
#: apps/schedule/apps.py:8 templates/menu.html:9
msgid "Schedules"
msgstr ""
#: apps/schedule/models.py:12
msgid "Select the employee that is responsible for this schedule request"
msgstr ""
#: apps/schedule/models.py:14
msgid "Name of the schedule"
msgstr ""
#: apps/schedule/models.py:15
msgid "Email address"
msgstr ""
#: apps/schedule/models.py:15
msgid "Email address where the results will be sent to."
msgstr ""
#: apps/schedule/models.py:17
msgid "Schedule input"
msgstr ""
#: apps/schedule/models.py:17
msgid "The schedule input in JSON format based on the form data"
msgstr ""
#: apps/schedule/models.py:18
msgid "Peregrine input"
msgstr ""
#: apps/schedule/models.py:18
msgid ""
"This is the translated content from the source for use with Peregrine cluster"
msgstr ""
#: apps/schedule/models.py:20
msgid "Peregrine accepted"
msgstr ""
#: apps/schedule/models.py:20
msgid "When true, the Peregrine cluster has picked up the job."
msgstr ""
#: apps/schedule/models.py:22
msgid "Peregrine binary output"
msgstr ""
#: apps/schedule/models.py:22
msgid "This is the output in binary format from the Peregrine cluster"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:4
#: apps/schedule/templates/schedule/schedule_list.html:5
#: apps/schedule/templates/schedule/schedule_list.html:8
msgid "Schedules overview list"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:11
msgid "Department"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:13
msgid "Created"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:14
msgid "Updated"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:15
msgid "Running"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:16
msgid "Report"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:29
msgid "No schedules available"
msgstr ""
#: lib/models/base.py:16
msgid "Date created"
msgstr ""
#: lib/models/base.py:16
msgid "The date and time this model has been created"
msgstr ""
#: lib/models/base.py:17
msgid "Date updated"
msgstr ""
#: lib/models/base.py:17
msgid "The date and time this model has been updated"
msgstr ""
#: polyclinic_scheduling/settings.py:129
msgid "Dutch"
msgstr ""
#: polyclinic_scheduling/settings.py:130
msgid "English"
msgstr ""
#: templates/menu.html:4
msgid "Menu"
msgstr ""
#: templates/menu.html:13
msgid "New schedule"
msgstr ""
#: templates/menu.html:18
msgid "Logout"
msgstr ""

View File

@ -0,0 +1,318 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-13 08:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps/RUG_template/apps.py:7 apps/RUG_template/apps.py:8
msgid "RUG_template"
msgstr ""
#: apps/RUG_template/templates/base.html:7
msgid "Welcome at RUG Data drop"
msgstr ""
#: apps/RUG_template/templates/base.html:84
msgid "Language selection"
msgstr ""
#: apps/RUG_template/templates/index.html:4
#: apps/RUG_template/templates/index.html:5
msgid "Welcome to the RUG Template page"
msgstr ""
#: apps/RUG_template/templates/index.html:8
msgid "Simple RUG Template"
msgstr ""
#: apps/RUG_template/templates/index.html:10
msgid "Some more text"
msgstr ""
#: apps/RUG_template/templates/menu.html:4
msgid "Section"
msgstr ""
#: apps/RUG_template/templates/menu.html:9
msgid "Menu item"
msgstr ""
#: apps/RUG_template/templates/pager.html:13
msgid "previous"
msgstr ""
#: apps/RUG_template/templates/pager.html:21
msgid "next"
msgstr ""
#: apps/RUG_template/templates/registration/login.html:4
#: apps/RUG_template/templates/registration/login.html:5
#: apps/RUG_template/templates/registration/login.html:8
msgid "Login"
msgstr ""
#: apps/RUG_template/templates/registration/login.html:23
msgid "Lost password?"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_complete.html:4
#: apps/RUG_template/templates/registration/password_reset_complete.html:5
#: apps/RUG_template/templates/registration/password_reset_complete.html:8
msgid "Password reset complete"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_confirm.html:4
#: apps/RUG_template/templates/registration/password_reset_confirm.html:5
#: apps/RUG_template/templates/registration/password_reset_confirm.html:8
msgid "Set a new password!"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_confirm.html:24
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a new password reset."
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_done.html:4
#: apps/RUG_template/templates/registration/password_reset_done.html:5
#: apps/RUG_template/templates/registration/password_reset_done.html:8
msgid "Reset password, email sent"
msgstr ""
#: apps/RUG_template/templates/registration/password_reset_form.html:4
#: apps/RUG_template/templates/registration/password_reset_form.html:5
#: apps/RUG_template/templates/registration/password_reset_form.html:8
msgid "Reset password"
msgstr ""
#: apps/employee/apps.py:7
msgid "Employee"
msgstr ""
#: apps/employee/apps.py:8
msgid "Employees"
msgstr ""
#: apps/employee/models.py:11
msgid "Django user"
msgstr ""
#: apps/employee/models.py:13
msgid "Select the hospital for this employee"
msgstr ""
#: apps/employee/models.py:15
msgid "Select the polyclinic(s) for this employee"
msgstr ""
#: apps/employee/models.py:16 apps/hospital/models.py:12
#: apps/polyclinic/models.py:11
msgid "Phone number"
msgstr ""
#: apps/employee/models.py:16
msgid "The direct phone number of this employee"
msgstr ""
#: apps/hospital/apps.py:7
msgid "Hospital"
msgstr ""
#: apps/hospital/apps.py:8
msgid "Hospitals"
msgstr ""
#: apps/hospital/models.py:8 apps/polyclinic/models.py:10
#: apps/schedule/models.py:14
#: apps/schedule/templates/schedule/schedule_list.html:12
msgid "Name"
msgstr ""
#: apps/hospital/models.py:8
msgid "The name of this hospital"
msgstr ""
#: apps/hospital/models.py:9
msgid "Address"
msgstr ""
#: apps/hospital/models.py:9
msgid "The address of this hospital"
msgstr ""
#: apps/hospital/models.py:10
msgid "Postal code"
msgstr ""
#: apps/hospital/models.py:10
msgid "The postal code of this hospital"
msgstr ""
#: apps/hospital/models.py:11
msgid "City"
msgstr ""
#: apps/hospital/models.py:11
msgid "The city of this hospital"
msgstr ""
#: apps/hospital/models.py:12
msgid "The general phone number of this hospital"
msgstr ""
#: apps/polyclinic/apps.py:7
msgid "Polyclinic"
msgstr ""
#: apps/polyclinic/apps.py:8
msgid "Polyclinics"
msgstr ""
#: apps/polyclinic/models.py:9
msgid "To which hospital belongs this polyclinic"
msgstr ""
#: apps/polyclinic/models.py:10
msgid "The name of this polyclinic"
msgstr ""
#: apps/polyclinic/models.py:11
msgid "The general/direct phone number of this polyclinic"
msgstr ""
#: apps/schedule/apps.py:7
msgid "Schedule"
msgstr ""
#: apps/schedule/apps.py:8 templates/menu.html:9
msgid "Schedules"
msgstr ""
#: apps/schedule/models.py:12
msgid "Select the employee that is responsible for this schedule request"
msgstr ""
#: apps/schedule/models.py:14
msgid "Name of the schedule"
msgstr ""
#: apps/schedule/models.py:15
msgid "Email address"
msgstr ""
#: apps/schedule/models.py:15
msgid "Email address where the results will be sent to."
msgstr ""
#: apps/schedule/models.py:17
msgid "Schedule input"
msgstr ""
#: apps/schedule/models.py:17
msgid "The schedule input in JSON format based on the form data"
msgstr ""
#: apps/schedule/models.py:18
msgid "Peregrine input"
msgstr ""
#: apps/schedule/models.py:18
msgid ""
"This is the translated content from the source for use with Peregrine cluster"
msgstr ""
#: apps/schedule/models.py:20
msgid "Peregrine accepted"
msgstr ""
#: apps/schedule/models.py:20
msgid "When true, the Peregrine cluster has picked up the job."
msgstr ""
#: apps/schedule/models.py:22
msgid "Peregrine binary output"
msgstr ""
#: apps/schedule/models.py:22
msgid "This is the output in binary format from the Peregrine cluster"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:4
#: apps/schedule/templates/schedule/schedule_list.html:5
#: apps/schedule/templates/schedule/schedule_list.html:8
msgid "Schedules overview list"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:11
msgid "Department"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:13
msgid "Created"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:14
msgid "Updated"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:15
msgid "Running"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:16
msgid "Report"
msgstr ""
#: apps/schedule/templates/schedule/schedule_list.html:29
msgid "No schedules available"
msgstr ""
#: lib/models/base.py:16
msgid "Date created"
msgstr ""
#: lib/models/base.py:16
msgid "The date and time this model has been created"
msgstr ""
#: lib/models/base.py:17
msgid "Date updated"
msgstr ""
#: lib/models/base.py:17
msgid "The date and time this model has been updated"
msgstr ""
#: polyclinic_scheduling/settings.py:129
msgid "Dutch"
msgstr ""
#: polyclinic_scheduling/settings.py:130
msgid "English"
msgstr ""
#: templates/menu.html:4
msgid "Menu"
msgstr ""
#: templates/menu.html:13
msgid "New schedule"
msgstr ""
#: templates/menu.html:18
msgid "Logout"
msgstr ""

21
polyclinic_scheduling/manage.py Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'polyclinic_scheduling.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()

View File

@ -0,0 +1,38 @@
# A uniquely secret key
SECRET_KEY=@wb=#(f4uc0l%e!5*eo+aoflnxb(@!l9!=c5w=4b+x$=!8&vy%'
# Disable debug in production
DEBUG=False
# Allowed hosts that Django does server. Take care when NGINX is proxying infront of Django
ALLOWED_HOSTS=127.0.0.1,localhost
# All internal IPS for Django. Use comma separated list
INTERNAL_IPS=127.0.0.1
# Enter the database url connection: https://github.com/jacobian/dj-database-url
DATABASE_URL=sqlite:////opt/deploy/VRE/VirtualResearchEnvironment/db.sqlite3
# The location on disk where the static files will be placed during deployment. Setting is required
STATIC_ROOT =
# Email settings
# Mail host
EMAIL_HOST=
# Email user name
EMAIL_HOST_USER=
# Email password
EMAIL_HOST_PASSWORD=
# Email server port number to use
EMAIL_PORT=25
# Does the email server supports TLS?
EMAIL_USE_TLS=
# The sender address. This needs to be one of the allowed domains due to SPF checks
# The code will use a reply-to header to make sure that replies goes to the researcher and not this address
EMAIL_FROM_ADDRESS=Do not reply<no-reply@rug.nl>

View File

@ -0,0 +1,16 @@
"""
ASGI config for polyclinic_scheduling project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'polyclinic_scheduling.settings')
application = get_asgi_application()

View File

@ -0,0 +1,162 @@
"""
Django settings for polyclinic_scheduling project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
from decouple import config, Csv
from dj_database_url import parse as db_url
from django.utils.translation import ugettext_lazy as _
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = config('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', default=False, cast=bool)
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='127.0.0.1', cast=Csv())
INTERNAL_IPS = config('INTERNAL_IPS',default='127.0.0.1',cast=Csv())
# Application definition
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'apps.hospital',
'apps.polyclinic',
'apps.employee',
'apps.schedule',
'apps.RUG_template',
'django.contrib.admin', # Admin add here, so that we can overrule the password reset template
]
if DEBUG:
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
]
if DEBUG:
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
ROOT_URLCONF = 'polyclinic_scheduling.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'polyclinic_scheduling.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
'default': config(
'DATABASE_URL',
default='sqlite:///' + os.path.join(BASE_DIR, 'db.sqlite3'),
cast=db_url
)
}
# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGES = [
('nl', _('Dutch')),
('en', _('English')),
]
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = config('STATIC_ROOT',None)
EMAIL_FROM_ADDRESS = config('EMAIL_FROM_ADDRESS', default='Do not reply<no-reply@rug.nl>')
EMAIL_HOST = config('EMAIL_HOST', default='')
EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')
EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')
EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)
EMAIL_USE_TLS = config('EMAIL_USE_TLS', default=False, cast=bool)
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'sent_emails')

View File

@ -0,0 +1,34 @@
"""polyclinic_scheduling URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('i18n/', include('django.conf.urls.i18n')),
path('accounts/', include('django.contrib.auth.urls')),
path('', include('apps.RUG_template.urls')),
path('schedule/', include('apps.schedule.urls')),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

View File

@ -0,0 +1,16 @@
"""
WSGI config for polyclinic_scheduling project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'polyclinic_scheduling.settings')
application = get_wsgi_application()

View File

@ -0,0 +1,23 @@
{% load i18n %}
<li class="rug-nav--secondary__item">
<a class="rug-nav--secondary__link js--togglable-switch" data-toggle-class="rug-nav--secondary__link--selected" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31" data-toggle-mode="togglable">{% trans "Menu" %}</a>
<ul class="rug-nav--secondary__sub rug-nav--secondary__sub--hidden js--togglable-item" data-toggle-class="rug-block" data-toggle-group="submenu" data-toggle-id="menu-2427370b-9435-44d9-bca7-b93ec9d03cc0-33.31">
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.34">
<a class="rug-nav--secondary__sub__link" href="{% url 'schedule:list' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Schedules" %}</span></a>
</li>
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.35">
<a class="rug-nav--secondary__sub__link" href="{% url 'schedule:new' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "New schedule" %}</span></a>
</li>
<li class="rug-nav--secondary__sub__item" data-menu-id="b512aa55-f0cb-4588-9054-302caa5fa951-33.36">
<a class="rug-nav--secondary__sub__link" href="{% url 'logout' %}"><span class="rug-nav--secondary__sub__link-text">{% trans "Logout" %}</span></a>
</li>
</ul>
</li>

View File

@ -0,0 +1,13 @@
{% extends 'base.html' %} <!-- Add this for inheritance -->
{% load i18n %}
{% block title %}{% trans "Singup" %}{% endblock %}
{% block pagetitle %}{% trans "Singup" %}{% endblock %}
{% block content %}
<p>
<strong>{% trans "Singup" %}</strong>
<br />
Please contact x@y.z
</p>
{% endblock %}

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
Django==3.0.6
jsonfield==3.1.0
python-decouple==3.3
dj-database-url==0.5.0