Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to backend info from project edit form #556

Merged
merged 3 commits into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions anitya/templates/functions.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% macro render_field_in_row(field, after="") %}
<td>{{ field.label }}</td>
{% macro render_field_in_row(field, after="", docs="") %}
<td>
{%- if docs -%}<a href="{{ docs }}">{%- endif -%}
{{ field.label }}
{%- if docs -%}</a>{%- endif -%}
</td>
<td>
{{ field(**kwargs)|safe }}
</td>
Expand Down
2 changes: 1 addition & 1 deletion anitya/templates/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h4 class="list-group-item-heading">Homepage:</h4>
</div><!-- end list-group-item -->

<div class="list-group-item">
<h4 class="list-group-item-heading">Backend:</h4>
<h4 class="list-group-item-heading"><a href="{{ url_for('anitya_ui.static', filename='docs/user-guide.html') }}#backends">Backend</a>:</h4>
<div class="list-group-item-text">
<p>{{ project.backend }}</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion anitya/templates/project_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1>{{ context }} project</h1>
{{ render_field_in_row(form.homepage, type="url", tabindex=2) }}
</tr>
<tr>
{{ render_field_in_row(form.backend, tabindex=3) }}
{{ render_field_in_row(form.backend, docs=url_for('anitya_ui.static', filename='docs/user-guide.html') + "#backends", tabindex=3) }}
</tr>
<tr>
{{ render_field_in_row(form.version_scheme, tabindex=4) }}
Expand Down
1 change: 1 addition & 0 deletions news/556.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Link to backend info from project view and edit pages