conference-archive/templates/person.html
2023-09-15 23:34:41 +05:30

99 lines
2.8 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ item.name }}{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h1>{{ item.name }}</h1>
<p><a href="{{ url_for("index") }}">home</a></p>
<h3>Conferences</h3>
{% for apperance in item.conferences_association %}
{% set conf = apperance.conference %}
<div class="card my-2">
<div class="card-body">
<h5 class="card-title">{{ conf.id }}: {{ conf.title }}</h5>
<p class="card-text">
{% if apperance.bio %}{{ apperance.bio | safe }}{% else %}No speaker biography.{% endif %}
</p>
</div>
</div>
{% endfor %}
{% set search_for = '"' + item.name + '" ' + " haswbstatement:P31=Q5" %}
<p><a href="https://www.wikidata.org/w/index.php?search={{ search_for | urlencode }}&title=Special%3ASearch&ns0=1&ns120=1">Search for {{ item.name }} on Wikidata</a></p>
<form method="POST">
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" name="name" id="name" value="{{ item.name }}">
</div>
<div class="mb-3">
<label for="wikidata_qid" class="form-label">Wikidata QID</label>
<input type="text" class="form-control" name="wikidata_qid" id="wikidata_qid" value="{{ item.wikidata_qid or "" }}">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<h3>Talks</h3>
<p>Has {{ item.events_association.count() }} events</p>
{% for event in item.events_by_time() %}
<div class="card my-2">
<div class="card-body">
<h5 class="card-title">
<a href="{{ url_for("event_page", event_id=event.id) }}">{{ event.title }}</a>
</h5>
<h6 class="card-subtitle mb-2 text-body-secondary">
{{ event.conference.title }}
&mdash;
{% if event.event_date %}
{{ event.event_date.strftime("%d %b %Y") }}
{% else %}
event date missing
{% endif %}
</h6>
<p class="card-text">
{% if event.url %}
<a href="{{ event.url }}">{{ event.title }} on conference website</a>
{% endif %}
{% if event.abstract %}
<p class="card-text">
{% if "<" in event.abstract %}
{{ event.abstract | safe }}
{% else %}
{{ event.abstract }}
{% endif %}
</p>
{% endif %}
{% if event.description %}
<p class="card-text">
{% if "<" in event.description %}
{{ event.description | safe }}
{% else %}
{{ event.description }}
{% endif %}
</p>
{% endif %}
<p class="card-text">
{% for p in event.people %}
{% if p.id != item.id %}
<a href="{{ url_for(request.endpoint, person_id=p.id) }}">{{ p.name }}</a>
{% endif %}
{% endfor %}
</p>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}