add title modal
This commit is contained in:
parent
511eea5bdf
commit
8a60c1000b
|
@ -4,6 +4,29 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="modal fade" id="title-modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">set {{ doc.type }} title</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form method="POST" action="{{ doc.add_title_url }}">
|
||||
<div class="modal-body">
|
||||
<label for="form-title">title</label>
|
||||
<input name="title" id="form-title" class="form-control">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary">Add title</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{{ doc.url }}">View</a>
|
||||
|
@ -24,7 +47,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<h1 class="mt-3">{{ self.title() }}</h1>
|
||||
<h1 class="mt-3">{{ self.title() }}
|
||||
{% if current_user.is_authenticated and doc.user == current_user and not doc.has_title() %}
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#title-modal">add title</button>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if version %}
|
||||
<p>Revision as of {{ version.modified.strftime('%H:%M, %d %B %Y') }}</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue