Rename kaehmy templates
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ from webapp.models import OhlhafvChallenge, KaehmyForm, KaehmyMessage
|
||||
|
||||
|
||||
class KaehmyCheckboxSelectMultiple(forms.widgets.CheckboxSelectMultiple):
|
||||
option_template_name = 'kaehmy_checkbox_option.html'
|
||||
option_template_name = 'checkbox_option.html'
|
||||
|
||||
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):
|
||||
dic = super(KaehmyCheckboxSelectMultiple, self).create_option(name, value, label, selected, index, subindex, attrs)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{% extends "webapp_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% trans "SIK Admin" %}</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam consectetur vitae arcu at bibendum. Nam vel vulputate massa, sit amet volutpat tellus. Fusce varius lectus iaculis nunc laoreet, ac ultricies nulla luctus. Nam fringilla ipsum vel tincidunt viverra. Fusce vestibulum, metus et tincidunt commodo, leo mauris vulputate magna, ut euismod magna nisi eu sem. Integer venenatis, enim in feugiat tempus, erat urna ornare turpis, in varius eros ligula vitae libero. Aliquam erat volutpat. Curabitur ac interdum quam. Duis ornare, eros ac laoreet finibus, libero arcu molestie tellus, id finibus velit lacus nec nibh. Morbi vehicula dolor vel imperdiet pharetra. Maecenas purus lorem, vulputate eget lacus ut, pharetra eleifend sem. Sed aliquam eleifend posuere. Maecenas ac scelerisque odio. Nunc facilisis cursus ornare. Sed neque turpis, sodales id rhoncus eget, vestibulum id urna. Nam ornare urna quis felis porta, vel mollis leo laoreet.
|
||||
</p>
|
||||
<p>
|
||||
Proin sed odio a nisi aliquet blandit quis at dolor. Sed tincidunt neque vel ex pulvinar, auctor elementum magna euismod. Pellentesque vel porta justo, quis pulvinar diam. Pellentesque consectetur convallis tellus faucibus lobortis. Mauris ornare erat ac varius condimentum. Sed neque augue, semper quis iaculis a, tincidunt sed diam. Donec volutpat non justo quis mollis. Maecenas nisi enim, mollis sed hendrerit nec, mattis eu diam. Nunc a faucibus neque, scelerisque fermentum ligula. Pellentesque tempus pharetra tempor. Quisque tincidunt orci vel ullamcorper venenatis. Phasellus blandit et purus molestie facilisis. Maecenas auctor accumsan pellentesque. Ut vel mi sem. Etiam porttitor metus vitae nulla pulvinar, nec efficitur metus tincidunt.
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<nav class="navbar navbar-default sidebar" role="navigation">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="collapse navbar-collapse" id="bs-sidebar-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/sikadmin">SIK Admin</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,25 @@
|
||||
{% extends "form_base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
{% block header %}
|
||||
<div class="kaehmy_header">
|
||||
{% include "kaehmy/header.html" %}
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include "kaehmy/navigation.html" %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="kaehmy-content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
{% block footer %}
|
||||
{% include "kaehmy/footer.html" %}
|
||||
{% endblock footer %}
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "kaehmy/kaehmy_base.html" %}
|
||||
{% extends "kaehmy/base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "kaehmy/kaehmy_base.html" %}
|
||||
{% extends "kaehmy/base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends "kaehmy/kaehmy_base.html" %}
|
||||
{% extends "kaehmy/base.html" %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include "kaehmy/kaehmy_navigation.html" %}
|
||||
{% include "kaehmy/navigation.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load staticfiles %}
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Aalto-yliopiston Sähköinsinöörikilta ry">
|
||||
<meta name="author" content="Aalto-yliopiston Sähköinsinöörikilta ry">
|
||||
<link rel="stylesheet" href="/static/css/webapp_kaehmy.css">
|
||||
<title>{% trans "Aalto-yliopiston Sähköinsinöörikilta ry" %}</title>
|
||||
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="{% static "js/lib/jquery-3.1.0.min.js" %}"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxAZXuh4HwSYylfB+J125MxIs6mR5FOHamPBG064zB+AFeWH94NdvaCBm8qnd" crossorigin="anonymous">
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<script src="{% static "js/lib/underscore-min.js" %}"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% block header %}
|
||||
<div class="kaehmy_header">
|
||||
{% include "kaehmy/kaehmy_header.html" %}
|
||||
</div>
|
||||
{% endblock header %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include "kaehmy/kaehmy_navigation.html" %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="kaehmy-content">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
{% block footer %}
|
||||
{% include "kaehmy/kaehmy_footer.html" %}
|
||||
{% endblock footer %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends "kaehmy/kaehmy_base.html" %}
|
||||
{% extends "kaehmy/base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include "kaehmy/kaehmy_navigation.html" %}
|
||||
{% include "kaehmy/navigation.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
<div class="collapse" id="collapse_{{ application.id }}">
|
||||
{% for message in application.messages.all %}
|
||||
{% include "kaehmy/kaehmy_message.html" with messages=message.messages.all %}
|
||||
{% include "kaehmy/message.html" with messages=message.messages.all %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div>
|
||||
{% for message in messages %}
|
||||
{% include "kaehmy/kaehmy_message.html" with messages=message.messages.all %}
|
||||
{% include "kaehmy/message.html" with messages=message.messages.all %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
{% load i18n %}
|
||||
|
||||
<link rel="stylesheet" href="/static/css/kaehmy_nav.css">
|
||||
<div class="kaehmy_navigation">
|
||||
<nav class="navbar-border navbar navbar-toggleable-md navbar-light bg-faded">
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
{% extends "kaehmy/kaehmy_base.html" %}
|
||||
{% extends "kaehmy/base.html" %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include "kaehmy/kaehmy_navigation.html" %}
|
||||
{% include "kaehmy/navigation.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -17,5 +17,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% include "kaehmy/kaehmy_footer.html" %}
|
||||
{% include "kaehmy/footer.html" %}
|
||||
{% endblock footer %}
|
||||
@@ -4,7 +4,6 @@ from django.conf.urls import url
|
||||
# from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from webapp.views import main_index
|
||||
from webapp.views import admin_index
|
||||
from webapp.views import login_view
|
||||
from webapp.views import logout_view
|
||||
from webapp.views import about_view
|
||||
@@ -28,7 +27,6 @@ from webapp.views import kaehmy_export_view
|
||||
urlpatterns = [
|
||||
# main
|
||||
url(r'^$', main_index),
|
||||
url(r'^sikadmin$', admin_index),
|
||||
|
||||
# login stuff
|
||||
url(r'^login$', login_view),
|
||||
|
||||
+5
-14
@@ -44,15 +44,6 @@ def main_index(request, *args, **kwargs):
|
||||
return render(request, "main_index.html", {})
|
||||
|
||||
|
||||
@require_http_methods(["GET", "POST"])
|
||||
@ensure_csrf_cookie
|
||||
@login_required(login_url='/login')
|
||||
@permission_required('members.change_member')
|
||||
def admin_index(request, *args, **kwargs):
|
||||
"""Render admin main page."""
|
||||
return render(request, "admin_index.html", {})
|
||||
|
||||
|
||||
@require_http_methods(["GET", "POST"])
|
||||
def login_view(request, *args, **kwargs):
|
||||
"""Render login view."""
|
||||
@@ -208,7 +199,7 @@ def kaehmy_list_view(request, *args, **kwargs):
|
||||
'application_count': len(applications),
|
||||
'filter_options': filter_options
|
||||
}
|
||||
return render(request, 'kaehmy/kaehmy_list.html', context)
|
||||
return render(request, 'kaehmy/list.html', context)
|
||||
|
||||
|
||||
@ensure_csrf_cookie
|
||||
@@ -236,7 +227,7 @@ def kaehmy_comment(request, *args, **kwargs):
|
||||
context = {
|
||||
'error': form.errors
|
||||
}
|
||||
return render(request, 'kaehmy/kaehmy_error.html', context)
|
||||
return render(request, 'kaehmy/error.html', context)
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@@ -261,7 +252,7 @@ def kaehmy_statistics_view(request, *args, **kwargs):
|
||||
'application_count': len(applications),
|
||||
'role_list': role_list
|
||||
}
|
||||
return render(request, 'kaehmy/kaehmy_statistics.html', context)
|
||||
return render(request, 'kaehmy/statistics.html', context)
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@@ -314,7 +305,7 @@ def kaehmy_submit(request, *args, **kwargs):
|
||||
context = {
|
||||
'error': form.errors
|
||||
}
|
||||
return render(request, 'kaehmy/kaehmy_error.html', context)
|
||||
return render(request, 'kaehmy/error.html', context)
|
||||
return HttpResponseRedirect('/kaehmy')
|
||||
|
||||
|
||||
@@ -338,4 +329,4 @@ def kaehmy_export_view(request, *args, **kwargs):
|
||||
'non_board_table': make_table(non_board),
|
||||
'board_table': make_table(board),
|
||||
}
|
||||
return render(request, 'kaehmy/kaehmy_export.html', context)
|
||||
return render(request, 'kaehmy/export.html', context)
|
||||
|
||||
Reference in New Issue
Block a user