parent
68eb2ef26e
commit
234982796e
|
@ -13,7 +13,14 @@
|
||||||
<li><a href="/admin/">Admin</a></li>
|
<li><a href="/admin/">Admin</a></li>
|
||||||
<li><a href="{% url new_libraries %}">Libraries Needing Approval</a></li>
|
<li><a href="{% url new_libraries %}">Libraries Needing Approval</a></li>
|
||||||
<li><a href="{% url press_submitterator %}">Press Coverage</a></li>
|
<li><a href="{% url press_submitterator %}">Press Coverage</a></li>
|
||||||
|
{% if facet = 'top' %}
|
||||||
|
<li><a href="{% url accepted %}">Accepted Rights Holders</a></li>
|
||||||
|
<li><a href="{% url claims %}">Active Claims</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><a href="{% url rh_admin %}">Unglue.it Admin</a></li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% if facet = 'top' %}
|
||||||
<h2>Rights Holder Admin</h2>
|
<h2>Rights Holder Admin</h2>
|
||||||
|
|
||||||
<h3> Create New Rights Holder </h3>
|
<h3> Create New Rights Holder </h3>
|
||||||
|
@ -22,7 +29,8 @@
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input type="submit" name="create_rights_holder" value="Create" id="submit">
|
<input type="submit" name="create_rights_holder" value="Create" id="submit">
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% if facet = 'accepted' %}
|
||||||
<h3> Accepted Rights Holders </h3>
|
<h3> Accepted Rights Holders </h3>
|
||||||
<dl>
|
<dl>
|
||||||
{% for rights_holder in rights_holders %}
|
{% for rights_holder in rights_holders %}
|
||||||
|
@ -34,8 +42,9 @@
|
||||||
<p>No rights holders have been accepted yet</p>
|
<p>No rights holders have been accepted yet</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</dl>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if pending %}
|
{% if pending and facet = 'top' %}
|
||||||
<h3> Pending Claims </h3>
|
<h3> Pending Claims </h3>
|
||||||
<form method="POST" action="#">
|
<form method="POST" action="#">
|
||||||
{{ pending_formset.management_form }}
|
{{ pending_formset.management_form }}
|
||||||
|
@ -56,7 +65,7 @@
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if active_data.count %}
|
{% if active_data.count and facet = 'claims' %}
|
||||||
<h3> Active Claims: {{ active_data.count }} </h3>
|
<h3> Active Claims: {{ active_data.count }} </h3>
|
||||||
<dl>
|
<dl>
|
||||||
{% for claim in active_data %}
|
{% for claim in active_data %}
|
||||||
|
|
|
@ -62,6 +62,8 @@ urlpatterns = patterns(
|
||||||
url(r"^rightsholders/edition/(?P<edition_id>\d*)/upload/$", "edition_uploads", name="edition_uploads"),
|
url(r"^rightsholders/edition/(?P<edition_id>\d*)/upload/$", "edition_uploads", name="edition_uploads"),
|
||||||
url(r"^rightsholders/claim/$", "claim", name="claim"),
|
url(r"^rightsholders/claim/$", "claim", name="claim"),
|
||||||
url(r"^rh_admin/$", "rh_admin", name="rh_admin"),
|
url(r"^rh_admin/$", "rh_admin", name="rh_admin"),
|
||||||
|
url(r"^rh_admin/accepted/$", "rh_admin", {'facet': 'accepted'}, name="accepted"),
|
||||||
|
url(r"^rh_admin/claims/$", "rh_admin", {'facet': 'claims'}, name="claims"),
|
||||||
url(r"^campaign_admin/$", "campaign_admin", name="campaign_admin"),
|
url(r"^campaign_admin/$", "campaign_admin", name="campaign_admin"),
|
||||||
url(r"^faq/$", FAQView.as_view(), {'location':'faq', 'sublocation':'all'}, name="faq"),
|
url(r"^faq/$", FAQView.as_view(), {'location':'faq', 'sublocation':'all'}, name="faq"),
|
||||||
url(r"^faq/(?P<location>\w*)/$", FAQView.as_view(), {'sublocation':'all'}, name="faq_location"),
|
url(r"^faq/(?P<location>\w*)/$", FAQView.as_view(), {'sublocation':'all'}, name="faq_location"),
|
||||||
|
|
|
@ -1658,7 +1658,7 @@ def rh_tools(request):
|
||||||
campaign.clone_form= CloneCampaignForm(initial={'campaign_id':campaign.id}, prefix = 'c%s' % campaign.id)
|
campaign.clone_form= CloneCampaignForm(initial={'campaign_id':campaign.id}, prefix = 'c%s' % campaign.id)
|
||||||
return render(request, "rh_tools.html", {'claims': claims ,'campaigns': campaigns})
|
return render(request, "rh_tools.html", {'claims': claims ,'campaigns': campaigns})
|
||||||
|
|
||||||
def rh_admin(request):
|
def rh_admin(request, facet='top'):
|
||||||
if not request.user.is_authenticated() :
|
if not request.user.is_authenticated() :
|
||||||
return render(request, "admins_only.html")
|
return render(request, "admins_only.html")
|
||||||
if not request.user.is_staff :
|
if not request.user.is_staff :
|
||||||
|
@ -1691,6 +1691,7 @@ def rh_admin(request):
|
||||||
'pending': zip(pending_data,pending_formset),
|
'pending': zip(pending_data,pending_formset),
|
||||||
'pending_formset': pending_formset,
|
'pending_formset': pending_formset,
|
||||||
'active_data': active_data,
|
'active_data': active_data,
|
||||||
|
'facet': facet,
|
||||||
}
|
}
|
||||||
return render(request, "rights_holders.html", context)
|
return render(request, "rights_holders.html", context)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue