Bug#754413: [PATCH] Provide a visual hint for subscription details
Hi,
This patch adds a button for editing subscriptions; I also
displays a link to the keywords meaning.
Cheers,
Christophe
---
.../accounts/templates/accounts/subscriptions.html | 12 ++++++++++++
distro_tracker/core/static/css/style.css | 5 +++++
2 files changed, 17 insertions(+)
diff --git a/distro_tracker/accounts/templates/accounts/subscriptions.html b/distro_tracker/accounts/templates/accounts/subscriptions.html
index 6361504..5c340ad 100644
--- a/distro_tracker/accounts/templates/accounts/subscriptions.html
+++ b/distro_tracker/accounts/templates/accounts/subscriptions.html
@@ -103,6 +103,7 @@
</div>
<div class="span2">
+ <button class="btn inline-btn">Edit</button>
<form style="margin-bottom: 0px;" action="{% url 'dtracker-api-accounts-unsubscribe' %}" method="POST">{% csrf_token %}
<input type="hidden" name="package" value="{{ subscription.package }}">
<input type="hidden" name="email" value="{{ email }}">
@@ -117,16 +118,22 @@
<div class="accordion-body collapse" id="{{ details_id }}">
<div class="accordion-inner">
+ <div class="row-fluid">
+ <div class="span10">
<div><b>Subscription keywords:</b></div>
<ul class="inline">
{% for keyword in subscription.keywords.all %}
<li class='keyword'>{{ keyword }}</li>
{% endfor %}
</ul>
+ </div>
+ <div class="span2">
<a href="{% url 'dtracker-accounts-profile-keywords' %}?package={{ subscription.package }}&email={{ email }}">
<div class="btn btn-small modify-subscription-keywords" data-email="{{ email }}" data-package="{{ subscription.package }}">Modify</div>
</a>
</div>
+ </div>
+ </div>
</div>
</div>
{% endwith %}{% endwith %}
@@ -190,6 +197,11 @@
{% endwith %}{% endwith %}
{% endif %}
+{% if subscriptions|length > 0 %}
+<p>Please refer to the <a href="https://www.debian.org/doc/manuals/developers-reference/resources.html#pkg-tracking-system">developer reference</a> for a description of the subscription keywords.</a></p>
+{% endif %}
+
+
{% if subscriptions|length != 1 %}
{# Close the group of subscriptions associated with one of the emails #}
</div></div></div>
diff --git a/distro_tracker/core/static/css/style.css b/distro_tracker/core/static/css/style.css
index 7100c26..665deea 100644
--- a/distro_tracker/core/static/css/style.css
+++ b/distro_tracker/core/static/css/style.css
@@ -273,3 +273,8 @@ ul.inline > li {
padding-left: 0;
padding-right: 10px;
}
+
+button.inline-btn {
+ float: left;
+ margin-right: 2px;
+}
--
2.0.1
Reply to: