Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2158c32e
authored
Aug 28, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: use get_text filter in templates
parent
3dcbf1fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
18 deletions
+13
-18
circle/dashboard/templates/dashboard/_notifications-timeline.html
+3
-2
circle/dashboard/templates/dashboard/instanceactivity_detail.html
+3
-7
circle/dashboard/templates/dashboard/node-detail/_activity-timeline.html
+2
-4
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+5
-5
No files found.
circle/dashboard/templates/dashboard/_notifications-timeline.html
View file @
2158c32e
{% load i18n %}
{% load i18n %}
{% load hro %}
{% for n in notifications %}
{% for n in notifications %}
<li
class=
"notification-message"
id=
"msg-{{n.id}}"
>
<li
class=
"notification-message"
id=
"msg-{{n.id}}"
>
<span
class=
"notification-message-subject"
>
<span
class=
"notification-message-subject"
>
{% if n.status == "new" %}
<i
class=
"fa fa-envelope-alt"
></i>
{% endif %}
{% if n.status == "new" %}
<i
class=
"fa fa-envelope-alt"
></i>
{% endif %}
{{ n.subject
.get_user_text
}}
{{ n.subject
|get_text:user
}}
</span>
</span>
<span
class=
"notification-message-date pull-right"
title=
"{{n.created}}"
>
<span
class=
"notification-message-date pull-right"
title=
"{{n.created}}"
>
{{ n.created|timesince }}
{{ n.created|timesince }}
</span>
</span>
<div
style=
"clear: both;"
></div>
<div
style=
"clear: both;"
></div>
<div
class=
"notification-message-text"
>
<div
class=
"notification-message-text"
>
{{ n.message
.get_user_text
|safe }}
{{ n.message
|get_text:user
|safe }}
</div>
</div>
</li>
</li>
{% empty %}
{% empty %}
...
...
circle/dashboard/templates/dashboard/instanceactivity_detail.html
View file @
2158c32e
{% extends "dashboard/base.html" %}
{% extends "dashboard/base.html" %}
{% load i18n %}
{% load i18n %}
{% load hro %}
{% block content %}
{% block content %}
<div
class=
"body-content"
>
<div
class=
"body-content"
>
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<h1><i
class=
"fa fa-{{icon}}"
></i>
<h1><i
class=
"fa fa-{{icon}}"
></i>
{{ object.instance.name }}:
{{ object.instance.name }}: {{object.readable_name|get_text:user}}
{% if user.is_superuser %}
{{object.readable_name.get_admin_text}}
{% else %}
{{object.readable_name.get_user_text}}
{% endif %}
</h1>
</h1>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -58,7 +54,7 @@
...
@@ -58,7 +54,7 @@
<dt>
{% trans "result" %}
</dt>
<dt>
{% trans "result" %}
</dt>
<dd><textarea
class=
"form-control"
>
{
% if user.is_superuser %}{{object.result.get_admin_text}}{% else %}{{object.result.get_user_text}}{% endif %
}
</textarea></dd>
<dd><textarea
class=
"form-control"
>
{
{object.result|get_text:user}
}
</textarea></dd>
<dt>
{% trans "resultant state" %}
</dt>
<dt>
{% trans "resultant state" %}
</dt>
<dd>
{{object.resultant_state|default:'n/a'}}
</dd>
<dd>
{{object.resultant_state|default:'n/a'}}
</dd>
...
...
circle/dashboard/templates/dashboard/node-detail/_activity-timeline.html
View file @
2158c32e
{% load i18n %}
{% load i18n %}
{% load hro %}
<div
id=
"activity-timeline"
class=
"timeline"
>
<div
id=
"activity-timeline"
class=
"timeline"
>
{% for a in activities %}
{% for a in activities %}
<div
class=
"activity"
data-activity-id=
"{{ a.pk }}"
>
<div
class=
"activity"
data-activity-id=
"{{ a.pk }}"
>
...
@@ -16,10 +17,7 @@
...
@@ -16,10 +17,7 @@
<div
data-activity-id=
"{{ s.pk }}"
<div
data-activity-id=
"{{ s.pk }}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}"
>
>
{% if user.is_superuser %}
{{ s.readable_name|get_text:user }}
{{ s.readable_name.get_admin_text }}
{% else %}
{{ s.readable_name.get_user_text }}{% endif %}
–
–
{% if s.finished %}
{% if s.finished %}
{{ s.finished|time:"H:i:s" }}
{{ s.finished|time:"H:i:s" }}
...
...
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
2158c32e
{% load i18n %}
{% load i18n %}
{% load hro %}
<div
id=
"activity-timeline"
class=
"timeline"
>
<div
id=
"activity-timeline"
class=
"timeline"
>
{% for a in activities %}
{% for a in activities %}
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<span
class=
"timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"
>
<span
class=
"timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"
>
<i
class=
"fa {% if not a.finished %}fa-refresh fa-spin {% else %}fa-{{a.icon}}{% endif %}"
></i>
<i
class=
"fa {% if not a.finished %}fa-refresh fa-spin {% else %}fa-{{a.icon}}{% endif %}"
></i>
</span>
</span>
<strong
{%
if
a
.
result
%}
title=
"{{ a.result
.get_user_text
}}"
{%
endif
%}
>
<strong
{%
if
a
.
result
%}
title=
"{{ a.result
|get_text:user
}}"
{%
endif
%}
>
<a
href=
"{{ a.get_absolute_url }}"
>
<a
href=
"{{ a.get_absolute_url }}"
>
{% if a.times > 1 %}({{ a.times }}x){% endif %}
{% if a.times > 1 %}({{ a.times }}x){% endif %}
{{ a.readable_name
.get_user_text
|capfirst }}
</a>
{{ a.readable_name
|get_text:user
|capfirst }}
</a>
{% if a.has_percent %}
{% if a.has_percent %}
- {{ a.percentage }}%
- {{ a.percentage }}%
...
@@ -33,9 +33,9 @@
...
@@ -33,9 +33,9 @@
<div
class=
"sub-timeline"
>
<div
class=
"sub-timeline"
>
{% for s in a.children.all %}
{% for s in a.children.all %}
<div
data-activity-id=
"{{ s.pk }}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}{% if s.pk == active.pk %} sub-activity-active{% endif %}"
>
<div
data-activity-id=
"{{ s.pk }}"
class=
"sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}{% if s.pk == active.pk %} sub-activity-active{% endif %}"
>
<span
{%
if
s
.
result
%}
title=
"{{ s.result
.get_user_text
}}"
{%
endif
%}
>
<span
{%
if
s
.
result
%}
title=
"{{ s.result
|get_text:user
}}"
{%
endif
%}
>
<a
href=
"{{ s.get_absolute_url }}"
>
<a
href=
"{{ s.get_absolute_url }}"
>
{{ s.readable_name
.get_user_text
|capfirst }}
</a></span>
–
{{ s.readable_name
|get_text:user
|capfirst }}
</a></span>
–
{% if s.finished %}
{% if s.finished %}
{{ s.finished|time:"H:i:s" }}
{{ s.finished|time:"H:i:s" }}
{% else %}
{% else %}
...
...
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