Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
e82e35b8
Commit
e82e35b8
authored
Jul 23, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show all color variants of widget
parent
ff463c64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
weblate/html/widgets.html
weblate/html/widgets.html
+9
-4
weblate/trans/widgets.py
weblate/trans/widgets.py
+1
-3
No files found.
weblate/html/widgets.html
View file @
e82e35b8
...
...
@@ -22,19 +22,24 @@
<h3>
{% trans "Image widgets" %}
</h3>
{% for widget in widget_list %}
<h4>
{% blocktrans %}Image {{ widget }}{% endblocktrans %}
</h4>
<h4>
{% blocktrans
with widget.name as widget
%}Image {{ widget }}{% endblocktrans %}
</h4>
<p>
{% trans "
Example
:" %}
</p>
<p>
{% trans "
Color variants
:" %}
</p>
<p><a
href=
"{{ engage_url }}"
><img
src=
"{{ widget_base_url }}{{ widget }}/"
/></a></p>
{% for color in widget.colors %}
<p><a
href=
"{{ engage_url }}"
><img
src=
"{{ widget_base_url }}{{ widget.name }}/?color={{ color }}"
/></a></p>
{% endfor %}
<p>
{% trans "Code:" %}
</p>
{% for color in widget.colors %}
<pre
class=
"ui-widget-content ui-corner-all code"
>
<
a href="{{ engage_url }}"
>
<
img src="{{ widget_base_url }}{{ widget
}}/
" /
>
<
img src="{{ widget_base_url }}{{ widget
.name }}/?color={{ color }}
" /
>
<
/a
>
</pre>
{% endfor %}
{% endfor %}
...
...
weblate/trans/widgets.py
View file @
e82e35b8
...
...
@@ -75,9 +75,7 @@ def widgets(request, project):
reverse
(
'weblate.trans.widgets.widgets'
,
kwargs
=
{
'project'
:
obj
.
slug
}),
)
widget_list
=
[
'287x66'
,
]
widget_list
=
[{
'name'
:
w
,
'colors'
:
list
(
WIDGETS
[
w
][
'colors'
])}
for
w
in
WIDGETS
]
return
render_to_response
(
'widgets.html'
,
RequestContext
(
request
,
{
'engage_url'
:
engage_url
,
...
...
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