small interface updates
This commit is contained in:
parent
e845ebde2b
commit
6dd43db2e2
3
TODO
3
TODO
@ -1,3 +1,6 @@
|
||||
* Make it possible to tag and find pastes
|
||||
* Add a button to find all the personal (and private) pastes
|
||||
(cookie bound)
|
||||
* Improve i18n support
|
||||
* Improve LodgeIt Interface (null-interface + star)
|
||||
* use udiff module instead of pygments-diff-highlighter for diff highlighning
|
||||
|
@ -34,8 +34,7 @@ class LodgeIt(object):
|
||||
metadata.create_all(self.engine)
|
||||
|
||||
#: 18n setup
|
||||
self.locale = None
|
||||
self.set_locale('en_US')
|
||||
self.locale = Locale('en')
|
||||
|
||||
#: jinja_environment update
|
||||
jinja_environment.globals.update(
|
||||
|
@ -40,7 +40,7 @@ class PasteController(object):
|
||||
if parent_id is not None:
|
||||
parent = Paste.get(parent_id)
|
||||
|
||||
spam = gerform('webpage') or antispam.is_spam(code)
|
||||
spam = getform('webpage') or antispam.is_spam(code)
|
||||
if spam:
|
||||
error = _('your paste contains spam')
|
||||
captcha = getform('captcha')
|
||||
|
@ -8,14 +8,14 @@ msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2008-07-08 10:05+0200\n"
|
||||
"PO-Revision-Date: 2008-07-09 08:39+0200\n"
|
||||
"PO-Revision-Date: 2008-07-20 11:20+0200\n"
|
||||
"Last-Translator: Christopher Grebs <cg@webshox.org>\n"
|
||||
"Language-Team: de <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 0.9.2\n"
|
||||
"Generated-By: Babel 0.9.3\n"
|
||||
|
||||
#: lodgeit/controllers/pastes.py:45
|
||||
msgid "your paste contains spam"
|
||||
|
@ -8,14 +8,14 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2008-07-09 08:39+0200\n"
|
||||
"POT-Creation-Date: 2008-07-20 11:18+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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 0.9.2\n"
|
||||
"Generated-By: Babel 0.9.3\n"
|
||||
|
||||
#: lodgeit/controllers/pastes.py:45
|
||||
msgid "your paste contains spam"
|
||||
|
@ -102,11 +102,15 @@ div.text {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
#languages li.active img {
|
||||
border: 2px solid #000;
|
||||
}
|
||||
|
||||
#paste {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid #84BCCA;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#paste table, #paste tbody {
|
||||
|
@ -83,5 +83,7 @@ def render_template(template_name, **tcontext):
|
||||
tcontext['new_replies'] = Paste.fetch_replies()
|
||||
if local.request:
|
||||
tcontext['request'] = local.request
|
||||
if local.application:
|
||||
tcontext['active_language'] = local.application.locale.language
|
||||
t = jinja_environment.get_template(template_name)
|
||||
return Response(t.render(tcontext), mimetype='text/html; charset=utf-8')
|
||||
|
@ -24,13 +24,16 @@
|
||||
('/about/', 'about', _('About')),
|
||||
('/help/', 'help', '?')
|
||||
] %}
|
||||
<li{% if active_page == id %} class="active"{%
|
||||
endif %}><a href="{{ href|e }}">{{ caption|e }}</a></li>
|
||||
<li{% if active_page == id %} class="active"{% endif %}>
|
||||
<a href="{{ href|e }}">{{ caption|e }}</a>
|
||||
</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
<ul id="languages">
|
||||
{% for lang in i18n_languages %}
|
||||
<li><a href="{{ '/language/%s'|format(lang[0]) }}"><img src="{{ '/static/flags/%s.png'|format(lang[0]) }}"></a></li>
|
||||
<li{% if active_language == lang[0] %} class="active"{% endif %}>
|
||||
<a href="{{ '/language/%s'|format(lang[0]) }}"><img src="{{ '/static/flags/%s.png'|format(lang[0]) }}"></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="content">
|
||||
|
Loading…
x
Reference in New Issue
Block a user