This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #884 from liqd/mn-2019-08-work-on-use_cases
Mn 2019 08 work on use cases
- Loading branch information
Showing
3 changed files
with
104 additions
and
22 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
apps/cms/use_cases/migrations/0003_usecaseindexpage_form_page.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 2.2.4 on 2019-08-08 15:51 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('a4_candy_cms_contacts', '0003_add_contact_person_data'), | ||
('a4_candy_cms_use_cases', '0002_usecaseindexpage_demo_link'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='usecaseindexpage', | ||
name='form_page', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='a4_candy_cms_contacts.FormPage'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 37 additions & 3 deletions
40
apps/cms/use_cases/templates/a4_candy_cms_use_cases/use_case_index_page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,48 @@ | ||
{% extends "base.html" %} | ||
{% load wagtailcore_tags %} | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
|
||
{% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %} | ||
{{ self.title }}{% endif %} — {{ block.super }}{% endblock %} | ||
|
||
{% block content %} | ||
<div class="l-wrapper"> | ||
<div class="l-center-8"> | ||
<h1 class="cms-title">{{ page.title }}</h1> | ||
{{ page.body|richtext }} | ||
<h1 class="cms-title">{{ page.subtitle }}</h1> | ||
{% for category in categories %} | ||
<a href="?category={{ category.0 }}">{{ category.1 }}</a> | ||
{% endfor %} | ||
</div> | ||
|
||
{% for use_case in use_cases %} | ||
{% if forloop.first %}<div class="row">{% endif %} | ||
{% if forloop.last and page.demo_link %} | ||
<div class="col-4"> | ||
<a href="{{ page.demo_page }}"> | ||
<h2>Ich bin eine Headline</h2> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris rhoncus dictum varius. | ||
Interdum et malesuada fames ac ante ipsumprimis in faucibus. </p> | ||
<div class="btn btn--transparent">Demo-Plattform ausprobieren</div> | ||
</a> | ||
{% else %} | ||
<div class="col-4"> | ||
<a href="{{ use_case.url }}"> | ||
{% if use_case.image %} | ||
{% image use_case.image fill-370x295 as image %} | ||
<img src="{{ image.url }}" alt="{{ image.alt }}" /> | ||
{% endif %} | ||
<span>{{ use_case.get_category_display }}</span> | ||
<h2>{{ use_case.title }}</h2> | ||
</a> | ||
</div> | ||
{% endif %} | ||
{% if forloop.counter|divisibleby:3%}</div><div class="row">{% endif %} | ||
{% if forloop.last %}</div>{% endif %} | ||
{% endfor %} | ||
</div> | ||
|
||
{% if page.form_page %} | ||
<div id="form_page"> | ||
{% include 'a4_candy_cms_contacts/includes/form.html' with page=page.form_page form=page.form %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} |