Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
66005b73
Commit
66005b73
authored
Nov 13, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mrjoes/flask-admin
parents
7b0f77a9
81db77a3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
5 deletions
+26
-5
admin.pot
babel/admin.pot
+9
-1
form.py
flask_admin/form.py
+6
-1
inline_form_list.html
flask_admin/templates/admin/model/inline_form_list.html
+2
-2
admin.mo
flask_admin/translations/ru/LC_MESSAGES/admin.mo
+0
-0
admin.po
flask_admin/translations/ru/LC_MESSAGES/admin.po
+9
-1
No files found.
babel/admin.pot
View file @
66005b73
...
...
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Flask-Admin VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-11-0
2 11:48
+0200\n"
"POT-Creation-Date: 2012-11-0
9 03:54
+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -269,6 +269,14 @@ msgstr ""
msgid "Save and Add"
msgstr ""
#: ../flask_admin/templates/admin/model/inline_form_list.html:24
msgid "Delete?"
msgstr ""
#: ../flask_admin/templates/admin/model/inline_form_list.html:32
msgid "Add"
msgstr ""
#: ../flask_admin/templates/admin/model/list.html:24
msgid "Add Filter"
msgstr ""
...
...
flask_admin/form.py
View file @
66005b73
...
...
@@ -6,7 +6,7 @@ from flask.globals import _request_ctx_stack
from
flask.ext
import
wtf
from
wtforms
import
fields
,
widgets
from
flask.ext.admin.babel
import
gettext
from
flask.ext.admin.babel
import
gettext
,
ngettext
class
BaseForm
(
wtf
.
Form
):
...
...
@@ -150,6 +150,11 @@ class RenderTemplateWidget(object):
kwargs
[
'field'
]
=
field
# Provide i18n support even if flask-babel is not installed
# or enabled.
kwargs
[
'_gettext'
]
=
gettext
kwargs
[
'_ngettext'
]
=
ngettext
template
=
jinja_env
.
get_template
(
self
.
template
)
return
template
.
render
(
kwargs
)
...
...
flask_admin/templates/admin/model/inline_form_list.html
View file @
66005b73
...
...
@@ -21,7 +21,7 @@
{%- if pk %}
<div
class=
"fa-inline-form-control"
>
<input
type=
"checkbox"
name=
"del-{{ subfield.id }}"
id=
"del-{{ subfield.id }}"
/>
<label
for=
"del-{{ subfield.id }}"
style=
"display: inline"
>
Delete?
</a
>
<label
for=
"del-{{ subfield.id }}"
style=
"display: inline"
>
{{ _gettext('Delete?') }}
</label
>
</div>
{%- endif -%}
{{ lib.render_form_fields(subfield, True) }}
...
...
@@ -29,5 +29,5 @@
</div>
{% endfor %}
</div>
<a
href=
"#"
class=
"btn"
onclick=
"faForm.addInlineModel('{{ field.id }}', '#{{ field.id }}-forms', {{ render_template(template)|tojson }});"
>
Add
{{ field.label.text }}
</a>
<a
href=
"#"
class=
"btn"
onclick=
"faForm.addInlineModel('{{ field.id }}', '#{{ field.id }}-forms', {{ render_template(template)|tojson }});"
>
{{ _gettext('Add') }}
{{ field.label.text }}
</a>
</div>
flask_admin/translations/ru/LC_MESSAGES/admin.mo
View file @
66005b73
No preview for this file type
flask_admin/translations/ru/LC_MESSAGES/admin.po
View file @
66005b73
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Flask-Admin\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-11-0
2 11:48
+0200\n"
"POT-Creation-Date: 2012-11-0
9 03:54
+0200\n"
"PO-Revision-Date: 2012-04-11 18:48+0200\n"
"Last-Translator: Serge S. Koval <serge.koval+github@gmail.com>\n"
"Language-Team: \n"
...
...
@@ -254,6 +254,14 @@ msgstr "Создать"
msgid "Save and Add"
msgstr "Сохранить и Добавить"
#: ../flask_admin/templates/admin/model/inline_form_list.html:24
msgid "Delete?"
msgstr "Удалить?"
#: ../flask_admin/templates/admin/model/inline_form_list.html:32
msgid "Add"
msgstr "Добавить"
#: ../flask_admin/templates/admin/model/list.html:24
msgid "Add Filter"
msgstr "Добавить Фильтр"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment