Skip to content

Commit

Permalink
new plural usage
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Apr 25, 2017
1 parent e27f965 commit 172aeae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/appier_extras/parts/admin/models/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def linked_apis(cls):
if settings.twitter_token: linked["twitter"] = settings.twitter_token
return linked

@classmethod
def _plural(self):
return "Settings"

def get_facebook_api(self):
try: import facebook
except: return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
{% if acl("admin.models." + _model._name()) %}
{% if section == "models" and model and model._name() == _model._name() %}
<a class="selected"
href="{{ url_for('admin.show_model', model = _model._name()) }}">{{ _model._readable() }}</a>
href="{{ url_for('admin.show_model', model = _model._name()) }}">{{ _model._plural() }}</a>
{% else %}
<a href="{{ url_for('admin.show_model', model = _model._name()) }}">{{ _model._readable() }}</a>
<a href="{{ url_for('admin.show_model', model = _model._name()) }}">{{ _model._plural() }}</a>
{% endif %}
{% endif %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% if acl("admin.models." + model._name()) %}
<li>
<div class="left">
<a class="name" href="{{ url_for('admin.show_model', model = model._name()) }}">{{ model._readable() }}</a>
<a class="name" href="{{ url_for('admin.show_model', model = model._name()) }}">{{ model._plural() }}</a>
</div>
<div class="right">
<span class="button create" data-link="{{ url_for('admin.new_entity', model = model._name()) }}">create</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "admin/admin.fluid.html.tpl" %}
{% block title %}{{ model._readable() }}{% endblock %}
{% block name %}{{ model._readable() }}{% endblock %}
{% block title %}{{ model._plural() }}{% endblock %}
{% block name %}{{ model._plural() }}{% endblock %}
{% block style %}no-padding{% endblock %}
{% block buttons %}
{{ super() }}
Expand Down

0 comments on commit 172aeae

Please sign in to comment.