Commit 2c24ec65 authored by Dennis Appel's avatar Dennis Appel

Remove Glossary

parent 4fa31592
......@@ -34,7 +34,6 @@ ALLOWED_HOSTS = [
INSTALLED_APPS = [
'checklist.apps.ChecklistConfig',
'wiki.apps.WikiConfig',
'glossary.apps.GlossaryConfig',
'welcome.apps.WelcomeConfig',
'about.apps.AboutConfig',
'django.contrib.admin',
......
......@@ -21,7 +21,6 @@ urlpatterns = [
path('welcome/', include('welcome.urls')),
path('about/', include('about.urls')),
path('wiki/', include('wiki.urls')),
path('glossary/', include('glossary.urls')),
path('checklist/', include('checklist.urls')),
path('admin/', admin.site.urls),
]
# Generated by Django 2.1.3 on 2018-11-06 17:41
# Generated by Django 2.1.3 on 2018-11-19 14:27
from django.db import migrations, models
import django.db.models.deletion
......@@ -9,20 +9,21 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('wiki', '0001_initial'),
('glossary', '0001_initial'),
('wiki', '__first__'),
]
operations = [
migrations.CreateModel(
name='ListEntry',
name='CheckListEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('listEntryTitle', models.CharField(max_length=200)),
('listEntrySeverity', models.CharField(max_length=10)),
('listEntryDescription', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
('checkListEntryTitle', models.CharField(max_length=200)),
('checkListEntrySeverity', models.CharField(max_length=10)),
('checkListEntryDescription', models.TextField()),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
options={
'ordering': ['checkListEntryTitle', '-checkListEntrySeverity'],
},
),
]
# Generated by Django 2.1.3 on 2018-11-06 17:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wiki', '0002_auto_20181106_1852'),
('glossary', '0001_initial'),
('checklist', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='CheckListEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('checkListEntryTitle', models.CharField(max_length=200)),
('checkListEntrySeverity', models.CharField(max_length=10)),
('checkListEntryDescription', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
migrations.RemoveField(
model_name='listentry',
name='glossaryEntry',
),
migrations.RemoveField(
model_name='listentry',
name='wikiEntry',
),
migrations.DeleteModel(
name='ListEntry',
),
]
# Generated by Django 2.1.3 on 2018-11-17 15:28
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('checklist', '0002_auto_20181106_1852'),
]
operations = [
migrations.AlterModelOptions(
name='checklistentry',
options={'ordering': ['checkListEntryTitle']},
),
]
......@@ -4,8 +4,6 @@ from django.db import models
class CheckListEntry(models.Model):
wikiEntry = models.ForeignKey(
'wiki.WikiEntry', on_delete=models.SET_NULL, null=True)
glossaryEntry = models.ForeignKey(
'glossary.GlossaryEntry', on_delete=models.SET_NULL, null=True)
checkListEntryTitle = models.CharField(max_length=200)
checkListEntrySeverity = models.CharField(max_length=10)
checkListEntryDescription = models.TextField()
......@@ -14,4 +12,4 @@ class CheckListEntry(models.Model):
return self.checkListEntryTitle
class Meta:
ordering = ['checkListEntryTitle']
ordering = ['checkListEntryTitle', '-checkListEntrySeverity']
......@@ -14,16 +14,15 @@
{% for entry in checklist_entries %}
<div class="cell cell-background-lg">
<h3>{{entry.checkListEntryTitle}}</h3>
<p>
<div>
<span class="alert label">Offen</span>
<span class="primary label">Gewichtung: {{entry.checkListEntrySeverity}}</span>
</p>
<p>
</div>
<p class="vertical-space-small">
{{entry.checkListEntryDescription}}</br>
<a class="link" href="{% url 'wiki:index' %}#item_{{entry.id}}">Wiki</a>
<a class="link" href="{% url 'glossary:index'%}#item_{{entry.id}}">Glossar</a>
</p>
<button class="hollow button" onclick="checkListToggle(this)">Erledigt</button>
<button class="button" onclick="checkListToggle(this)">Erledigt</button>
<a class="link" href="{% url 'wiki:index' %}#item_{{entry.id}}"><button class="hollow button">Wiki</button></a>
</div>
{% endfor %}
</div>
......
from django.contrib import admin
from .models import GlossaryEntry
admin.site.register(GlossaryEntry)
from django.apps import AppConfig
class GlossaryConfig(AppConfig):
name = 'glossary'
# Generated by Django 2.1.3 on 2018-11-06 17:41
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='GlossaryEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('glossaryTitle', models.CharField(max_length=200)),
('glossaryDefinition', models.TextField()),
],
),
]
from django.db import models
class GlossaryEntry(models.Model):
glossaryTitle = models.CharField(max_length=200)
glossaryDefinition = models.TextField()
def __str__(self):
return self.glossaryTitle
{% extends "base.html" %}
{% block title %}
{% with title="Glossar" %}
{{ block.super }}
{% endwith %}
{% endblock %}
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
app_name = 'glossary'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
]
from django.views import generic
class IndexView(generic.TemplateView):
template_name = 'glossary/index.html'
This source diff could not be displayed because it is too large. You can view the blob instead.
$(document).foundation();
function checkListToggle(element) {
let label = element.parentElement.getElementsByClassName("alert");
if (label[0] === undefined) {
label = element.parentElement.getElementsByClassName("success");
label[0].innerHTML = "Offen";
label[0].classList.add("alert");
label[0].classList.remove("success");
} else {
label[0].innerHTML = "Erledigt";
label[0].classList.add("success");
label[0].classList.remove("alert");
}
let label = element.parentElement.getElementsByClassName("label")[0];
label.innerHTML = label.classList.contains("alert") ? "Erledigt" : "Offen";
label.classList.toggle("alert");
label.classList.toggle("success");
}
......@@ -34,6 +34,10 @@ $dark-blue: #23405a;
margin-top: 40px;
}
.vertical-space-small {
margin-top: 20px;
}
.link {
color: $primary-color;
}
......
......@@ -27,7 +27,6 @@
<li class="menu-border-left"><a href="/about/">Infos</a></li>
<li class="menu-border-left"><a href="/checklist/">Checkliste</a></li>
<li class="menu-border-left"><a href="/wiki/">Wiki</a></li>
<li class="menu-border-left"><a href="/glossary/">Glossar</a></li>
</ul>
</div>
</div>
......
# Generated by Django 2.1.3 on 2018-11-06 17:41
# Generated by Django 2.1.3 on 2018-11-19 14:27
from django.db import migrations, models
import django.db.models.deletion
......@@ -9,31 +9,32 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('glossary', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Example',
name='WikiEntry',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('exampleTitle', models.CharField(max_length=200)),
('exampleText', models.TextField()),
('exampleResource', models.FileField(upload_to='')),
('wikiTitle', models.CharField(max_length=200)),
('wikiText', models.TextField()),
],
options={
'ordering': ['wikiTitle'],
},
),
migrations.CreateModel(
name='WikiEntry',
name='WikiExample',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('wikiTitle', models.CharField(max_length=200)),
('wikiText', models.TextField()),
('glossaryEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='glossary.GlossaryEntry')),
('exampleTitle', models.CharField(max_length=200)),
('exampleText', models.TextField()),
('exampleResource', models.FileField(blank=True, upload_to='')),
('examplePositive', models.BooleanField(default=True)),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
migrations.AddField(
model_name='example',
name='wikiEntry',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry'),
options={
'ordering': ['-examplePositive', 'exampleTitle'],
},
),
]
# Generated by Django 2.1.3 on 2018-11-06 17:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wiki', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='WikiExample',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('exampleTitle', models.CharField(max_length=200)),
('exampleText', models.TextField()),
('exampleResource', models.FileField(blank=True, upload_to='')),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
migrations.RemoveField(
model_name='example',
name='wikiEntry',
),
migrations.DeleteModel(
name='Example',
),
]
# Generated by Django 2.1.3 on 2018-11-06 23:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wiki', '0002_auto_20181106_1852'),
]
operations = [
migrations.CreateModel(
name='Wiki',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('wikiEntry', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry')),
],
),
]
# Generated by Django 2.1.3 on 2018-11-07 12:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wiki', '0003_wiki'),
]
operations = [
migrations.RemoveField(
model_name='wiki',
name='wikiEntry',
),
migrations.DeleteModel(
name='Wiki',
),
]
# Generated by Django 2.1.3 on 2018-11-16 19:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wiki', '0004_auto_20181107_1337'),
]
operations = [
migrations.AddField(
model_name='wikiexample',
name='examplePositive',
field=models.BooleanField(default=True),
),
]
# Generated by Django 2.1.3 on 2018-11-17 15:28
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wiki', '0005_wikiexample_examplepositive'),
]
operations = [
migrations.AlterModelOptions(
name='wikientry',
options={'ordering': ['wikiTitle']},
),
migrations.AlterModelOptions(
name='wikiexample',
options={'ordering': ['-examplePositive', 'exampleTitle']},
),
]
......@@ -2,8 +2,6 @@ from django.db import models
class WikiEntry(models.Model):
glossaryEntry = models.ForeignKey(
'glossary.GlossaryEntry', on_delete=models.SET_NULL, null=True)
wikiTitle = models.CharField(max_length=200)
wikiText = models.TextField()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment