Initial commit
This commit is contained in:
120
app/speakers/templates/speakers/speaker.html
Executable file
120
app/speakers/templates/speakers/speaker.html
Executable file
@ -0,0 +1,120 @@
|
||||
{% extends "blog/base.html" %}
|
||||
{% load render_table from django_tables2 %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12 m4 l4">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title center-align">
|
||||
{% if current_speaker.title %}
|
||||
{{current_speaker.title}}
|
||||
{% endif %}
|
||||
{% if current_speaker.nobility %}
|
||||
{{current_speaker.nobility}}
|
||||
{% endif %}
|
||||
{{current_speaker.first_name}}
|
||||
{% if current_speaker.name_prefix %}
|
||||
{{current_speaker.name_prefix}}
|
||||
{% endif %}
|
||||
{{current_speaker.last_name}}</span>
|
||||
<p class="center-align"><i class="large material-icons blue-grey-text darken-4">account_circle</i></p>
|
||||
<span class="card-title">Biographie</span>
|
||||
<ul>
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">cake</i> Geburtstag: {{current_speaker.birthday}}</li>
|
||||
<br />
|
||||
{% if current_speaker.day_of_death %}
|
||||
<li><b style="font-size: 2em;" class="blue-grey-text darken-4">†</b><span style="position: relative; right: -20px;"> Todesjahr:
|
||||
{{ current_speaker.day_of_death}}</span></li>
|
||||
<br />
|
||||
{% endif %}
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">home</i> Geburtsort: {{current_speaker.birthplace}}</li>
|
||||
<br />
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">work</i> Beruf: {{current_speaker.occupation}}</li>
|
||||
<br />
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">fingerprint</i> Bundestags ID: {{current_speaker.id}}</li>
|
||||
<br />
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">people</i> Partei: {{current_speaker.party}}<a class="tooltipped" data-position="bottom" data-tooltip="Aktuelle eingetragene Partei, bei der die Person Mitglied ist oder war. "><i
|
||||
class="material-icons blue-grey-text darken-4">info_outline</i></a></li>
|
||||
<br />
|
||||
<li><i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">filter_9_plus</i> Reden/Redebeiträge insgesamt: {{speech_count}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="collapsible expandable hoverable">
|
||||
{% if current_speaker.short_vita %}
|
||||
<li>
|
||||
<div class="collapsible-header">Kurzbiographie</div>
|
||||
<div class="collapsible-body white"><span>{{current_speaker.short_vita}}</span></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for period in sorted_l_info %}
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
<i class="material-icons blue-grey-text darken-4" style="margin-right: 10px;">library_books</i> Wahlperiode {{period.legislative_period}}
|
||||
</div>
|
||||
<div class="collapsible-body white">
|
||||
<ul>
|
||||
<span class="card-title">Mitglied des Bundestags</span>
|
||||
<li>Mitglied von {{period.legislative_period_start_date|date:"d.m.Y"}} bis
|
||||
{% if period.legislative_period_end_date is None %}
|
||||
heute
|
||||
{% else %}
|
||||
{{period.legislative_period_end_date|date:"d.m.Y"}}
|
||||
{% endif %}
|
||||
</li>
|
||||
<br />
|
||||
<li>Mandatsart: {{period.mandate_type}}
|
||||
<li>
|
||||
<br />
|
||||
<span class="card-title">Institutions und Fraktionszugehörigkeit</span>
|
||||
{% for institution in sorted_i_info %}
|
||||
{% if institution.current_period == period.legislative_period %}
|
||||
<li><b>{{institution.institution}}</b>
|
||||
<li>
|
||||
<br />
|
||||
{% if institution.institution_start_date is not None %}
|
||||
<li>Von {{institution.institution_start_date|date:"d.m.Y"}} bis
|
||||
{% if institution.institution_end_date is None %}
|
||||
heute
|
||||
{% else %}
|
||||
{{institution.institution_end_date|date:"d.m.Y"}}
|
||||
{% endif %}
|
||||
<li>
|
||||
<br />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col s12 m8">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Reden</span>
|
||||
<div class="card-content">
|
||||
<p>Alle Reden, die von {% if current_speaker.title %}
|
||||
{{current_speaker.title}}
|
||||
{% endif %}
|
||||
{% if current_speaker.nobility %}
|
||||
{{current_speaker.nobility}}
|
||||
{% endif %}
|
||||
{{current_speaker.first_name}}
|
||||
{% if current_speaker.name_prefix %}
|
||||
{{current_speaker.name_prefix}}
|
||||
{% endif %}
|
||||
{{current_speaker.last_name}} als MdB gehalten wurden.
|
||||
<div style="overflow-x:auto;">
|
||||
{% render_table speech_table %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
34
app/speakers/templates/speakers/speakers.html
Executable file
34
app/speakers/templates/speakers/speakers.html
Executable file
@ -0,0 +1,34 @@
|
||||
{% extends "blog/base.html" %}
|
||||
{% load render_table from django_tables2 %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Mitglieder des Bundestags</span>
|
||||
<p>Dies ist eine Liste aller Abgeordneten seit 1949 bis einschließlich der aktuellen Wahlperiode. Die Liste kann sortiert und durchsucht werden.</p>
|
||||
<p>Ausgangsdaten für diese Liste können auf der <a href="https://www.bundestag.de/service/opendata">offiziellen Seite des Bundestags</a> heruntergeladen werden.</p>
|
||||
<p>Für jede Person ist ein Profil angelegt, dass Informationen zu dieser bereithält und alle Reden bzw. Redebeiträge dieser gesammelt darstellt.</p>
|
||||
<br />
|
||||
<div class="row">
|
||||
<form method="GET" class="col l4 offset-l8 m6 offset-m6 s12">
|
||||
{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">search</i>
|
||||
{{form}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div style="overflow-x:auto;">
|
||||
{% render_table table %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
95
app/speakers/templates/speakers/table.html
Executable file
95
app/speakers/templates/speakers/table.html
Executable file
@ -0,0 +1,95 @@
|
||||
{% load django_tables2 %}
|
||||
{% load i18n %}
|
||||
{% block table-wrapper %}
|
||||
{% block table %}
|
||||
<table {% render_attrs table.attrs %} class="highlight">
|
||||
{% block table.thead %}
|
||||
{% if table.show_header %}
|
||||
<thead {{ table.attrs.thead.as_html }}>
|
||||
<tr>
|
||||
{% for column in table.columns %}
|
||||
<th {{ column.attrs.th.as_html }}>
|
||||
{% if column.orderable %}
|
||||
<a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}"><i class="material-icons ">sort</i> {{ column.header }}</a>
|
||||
{% else %}
|
||||
{{ column.header }}
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% endif %}
|
||||
{% endblock table.thead %}
|
||||
{% block table.tbody %}
|
||||
<tbody {{ table.attrs.tbody.as_html }}>
|
||||
{% for row in table.paginated_rows %}
|
||||
{% block table.tbody.row %}
|
||||
<tr {{ row.attrs.as_html }}>
|
||||
{% for column, cell in row.items %}
|
||||
<td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endblock table.tbody.row %}
|
||||
{% empty %}
|
||||
{% if table.empty_text %}
|
||||
{% block table.tbody.empty_text %}
|
||||
<tr><td colspan="{{ table.columns|length }}">{{ table.empty_text }}</td></tr>
|
||||
{% endblock table.tbody.empty_text %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endblock table.tbody %}
|
||||
{% block table.tfoot %}
|
||||
{% if table.has_footer %}
|
||||
<tfoot {{ table.attrs.tfoot.as_html }}>
|
||||
<tr>
|
||||
{% for column in table.columns %}
|
||||
<td {{ column.attrs.tf.as_html }}>{{ column.footer }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tfoot>
|
||||
{% endif %}
|
||||
{% endblock table.tfoot %}
|
||||
</table>
|
||||
{% endblock table %}
|
||||
|
||||
{% block pagination %}
|
||||
{% if table.page and table.paginator.num_pages > 1 %}
|
||||
<ul class="pagination">
|
||||
{% if table.page.has_previous %}
|
||||
{% block pagination.previous %}
|
||||
<li class="previous waves-effect">
|
||||
<a href="{% querystring table.prefixed_page_field=table.page.previous_page_number %}">
|
||||
{% trans '<i class="material-icons">chevron_left</i>' %}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock pagination.previous %}
|
||||
{% endif %}
|
||||
{% if table.page.has_previous or table.page.has_next %}
|
||||
{% block pagination.range %}
|
||||
{% for p in table.page|table_page_range:table.paginator %}
|
||||
<li {% if p == table.page.number %}class="active light-green darken-3"{% endif %} class="waves-effect">
|
||||
{% if p == '...' %}
|
||||
<a href="#">{{ p }}</a>
|
||||
{% else %}
|
||||
<a href="{% querystring table.prefixed_page_field=p %}">
|
||||
{{ p }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endblock pagination.range %}
|
||||
{% endif %}
|
||||
{% if table.page.has_next %}
|
||||
{% block pagination.next %}
|
||||
<li class="next waves-effect">
|
||||
<a href="{% querystring table.prefixed_page_field=table.page.next_page_number %}">
|
||||
{% trans '<i class="material-icons">chevron_right</i>' %}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock pagination.next %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock pagination %}
|
||||
{% endblock table-wrapper %}
|
Reference in New Issue
Block a user