view.html (1320B)
1 {% include 'header.html' %} 2 3 <title>{{ story['name'] }} in {{ story['disembarkname'] }} | Diaspora Diaries</title> 4 5 {% include 'nav.html' %} 6 7 <main role="main" class="container cover"> 8 9 {% if story %} 10 11 <h1 class="cover-heading">{{ story['name'] }} in {{ story['disembarkname'] }}</h1> 12 <hr> 13 14 <p> 15 {% if user %} 16 by <a href="/profile?id={{ user['id'] }}">{{story['name'] }}</a>, {{ parsetime(story['time']) }} 17 {% else %} 18 by {{ story['name'] }}, {{ parsetime(story['time']) }} 19 {% endif %} 20 {% if story['city'] %} 21 <br>in {{ story['city'] }} 22 {% endif %} 23 </p> 24 25 {% if current_user.is_admin or current_user.username == story['email'] %} 26 <a href="/edit?id={{ story['id'] }}" class="btn btn-sm btn-outline-secondary">Edit</a> 27 {% endif %} 28 {% if current_user.is_admin %} 29 <a href="/dashboard?hideid={{ story['id'] }}" class="btn btn-sm btn-outline-secondary">Hide</a> 30 {% endif %} 31 <hr> 32 33 {{ story['story']|safe }} 34 35 <hr> 36 <a href="/country?id={{ story['disembark'] }}">< back</a> 37 38 {% else %} 39 40 <h1 class="cover-heading">Error!</h1> 41 42 <p class="lead">No story with this story id.</p> 43 44 <p class="lead">You can return to the <a href="/">homepage</a> now.</p> 45 46 {% endif %} 47 48 </main> 49 50 {% include 'footer.html' %}