-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add New Link/Video button to officer profiles - add edit and delete buttons to links on officer profiles - add LinksApi for basic CRUD operations on links, including html templates - remove links subform from edit officer page - change user_id to creator_id in links table - add optional officer_id to links table - remove officer_links table - add links to officer profiles in test data
- Loading branch information
Showing
12 changed files
with
241 additions
and
48 deletions.
There are no files selected for viewing
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
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
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
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
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
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,32 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block content %} | ||
<div class="container theme-showcase" role="main"> | ||
|
||
<div class="page-header"> | ||
<h1> | ||
Delete Link for officer {{ obj.officer_id }} | ||
</h1> | ||
<p> | ||
<a href="{{ obj.url }}">{{ obj.title or obj.url }}</a> | ||
{% if obj.description or obj.author %} | ||
<div> | ||
{% if obj.description %} | ||
{{ obj.description }} | ||
{% endif %} | ||
{% if obj.author %} | ||
{% if obj.description %}- {% endif %}<em>{{ obj.author }}</em> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</p> | ||
</div> | ||
<p class="lead"> | ||
Are you sure you want to delete this link? | ||
This cannot be undone. | ||
<form action="{{ url_for('main.link_api_delete', obj_id=obj.id, officer_id=obj.officer_id) }}" method="post"> | ||
<button class='btn btn-danger' type="submit">Delete</button> | ||
</form> | ||
</p> | ||
</div> | ||
{% endblock content %} |
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,10 @@ | ||
{% extends "form.html" %} | ||
|
||
{% block page_title %} | ||
Update Link | ||
{% endblock page_title %} | ||
|
||
{% block form %} | ||
<p>For officer with OOID {{ form.officer_id.data }}.</p> | ||
{{ super() }} | ||
{% endblock form %} |
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,10 @@ | ||
{% extends 'form.html' %} | ||
|
||
{% block page_title %} | ||
New Link | ||
{% endblock page_title %} | ||
|
||
{% block form %} | ||
<p>For officer with OOID {{ form.officer_id.data }}.</p> | ||
{{ super() }} | ||
{% endblock form %} |
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
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
Oops, something went wrong.