-
Notifications
You must be signed in to change notification settings - Fork 18
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
Move over pinax-points templates #2
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% extends "admin/change_list.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block object-tools %} | ||
{% if has_add_permission %} | ||
<ul class="object-tools"> | ||
<li> | ||
<a href="one_off_points/">{% trans "Award one-off points" %}</a> | ||
</li> | ||
<li> | ||
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink"> | ||
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} | ||
</a> | ||
</li> | ||
</ul> | ||
{% endif %} | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% extends "admin/base_site.html" %} | ||
|
||
{% load i18n admin_modify adminmedia %} | ||
|
||
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want to ship static as part of the apps either. This should be moved into starter project sass. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nevermind, this is part of the admin system. hm... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, these templates are pretty tightly tied to the admin system. Feels a bit odd to put them side by side with the rest of the pinax templates given the differences. If there's a better way to do this I'd love to hear! |
||
|
||
{% block breadcrumbs %} | ||
<div class="breadcrumbs"> | ||
<a href="../../">{% trans "Home" %}</a> | ||
› | ||
<a href="../">{{ opts.app_label|capfirst }}</a> | ||
› | ||
<a href="../">{{ opts.verbose_name_plural|capfirst }}</a> | ||
› | ||
{% trans "Award one-off points" %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div id="content-main"> | ||
<h1>{% trans "Issue one-off point rewards" %}</h1> | ||
|
||
<form method="POST" action=""> | ||
{% csrf_token %} | ||
{% for fieldset in form %} | ||
{% include "admin/includes/fieldset.html" %} | ||
{% endfor %} | ||
|
||
<div class="submit-row"> | ||
{% trans "Award" as submit_text %} | ||
<input type="submit" value="{{ submit_text }}" class="default" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer the use of |
||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is at the wrong path.
Since this is an admin override I think you want it at the path:
but not entirely sure. It might be:
Because of the app lable: https://github.com/pinax/pinax-points/blob/master/pinax/points/apps.py#L8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - those long paths got me 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This admin file looks out of place to not be in the points directory. Are you sure it should be in its own separate admin folder in pinax-templates? If pinax-points were included in a starter project, perhaps the admin templates would be in the project templates folder. https://github.com/jaydenwindle/pinax-templates/tree/move_pinax_points_templates/pinax/templates/templates/pinax