Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
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
1519d326
authored
Jun 03, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-names' into 'master'
Feature display full names Closes #161
parents
090b6ac7
d8a77c1b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
12 deletions
+39
-12
circle/dashboard/templates/dashboard/_display-name.html
+15
-0
circle/dashboard/templates/dashboard/group-detail.html
+14
-2
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+4
-1
circle/dashboard/templates/dashboard/vm-list.html
+3
-1
circle/dashboard/views.py
+3
-8
No files found.
circle/dashboard/templates/dashboard/_display-name.html
0 → 100644
View file @
1519d326
{% load i18n %}
{% if user.get_full_name|length > 0 %}
{{ user.get_full_name }}
{% else %}
{{ user.username }}
{% endif %}
{% if show_org %}
{% if user.profile and user.profile.org_id|length > 0 %}
({{ user.profile.org_id }})
{% else %}
({% trans "username" %}: {{ user.username }})
{% endif %}
{% endif %}
circle/dashboard/templates/dashboard/group-detail.html
View file @
1519d326
...
...
@@ -50,7 +50,13 @@
<thead><tr><th></th><th>
{% trans "Who" %}
</th><th>
{% trans "Remove" %}
</th></tr></thead>
{% for i in users %}
<tr>
<td><i
class=
"icon-user"
></i></td><td>
{{i.username}}
</td>
<td>
<i
class=
"icon-user"
></i>
</td>
<td>
<strong>
{{i.username}}
</strong>
,
{% include "dashboard/_display-name.html" with user=i show_org=True %}
</td>
<td>
<a
data-group_pk=
"{{ group.pk }}"
data-member_pk=
"{{i.pk}}"
href=
"{% url "
dashboard
.
views
.
remove-user
"
member_pk=
i.pk
group_pk=
group.pk
%}"
class=
"real-link delete-from-group btn btn-link btn-xs"
><i
class=
"icon-remove"
><span
class=
"sr-only"
>
{% trans "remove" %}
</span></i></a>
</td>
...
...
@@ -83,7 +89,13 @@
<tbody>
{% for i in acl.users %}
<tr>
<td><i
class=
"icon-user"
></i></td><td>
{{i.user}}
</td>
<td>
<i
class=
"icon-user"
></i>
</td>
<td>
<strong>
{{i.user}}
</strong>
,
{% include "dashboard/_display-name.html" with user=i.user show_org=True %}
</td>
<td>
<select
class=
"form-control"
name=
"perm-u-{{i.user.id}}"
>
{% for id, name in acl.levels %}
...
...
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
1519d326
...
...
@@ -8,7 +8,10 @@
{% if user.is_superuser %}
<a
href=
"{{ a.get_absolute_url }}"
>
{% endif %}
{{ a.get_readable_name }}{% if user.is_superuser %}
</a>
{% endif %}
</strong>
{{ a.started|date:"Y-m-d H:i" }}{% if a.user %}, {{ a.user }}{% endif %}
{{ a.started|date:"Y-m-d H:i" }}
{% if a.user %},
{% include "dashboard/_display-name.html" with user=a.user show_org=True %}
{% endif %}
{% if a.is_abortable_for_user %}
<form
action=
"{{ a.instance.get_absolute_url }}"
method=
"POST"
class=
"pull-right"
>
{% csrf_token %}
...
...
circle/dashboard/templates/dashboard/vm-list.html
View file @
1519d326
...
...
@@ -62,7 +62,9 @@
<td
class=
"pk"
><div
id=
"vm-{{i.pk}}"
>
{{i.pk}}
</div>
</td>
<td
class=
"name"
><a
class=
"real-link"
href=
"{% url "
dashboard
.
views
.
detail
"
i
.
pk
%}"
>
{{ i.name }}
</a>
</td>
<td
class=
"state"
>
{{ i.get_status_display }}
</td>
<td>
{{ i.owner }}
</td>
<td>
{% include "dashboard/_display-name.html" with user=i.owner show_org=True %}
</td>
{% if user.is_superuser %}
<td
data-sort-value=
"{{ i.node.normalized_name }}"
>
{{ i.node.name|default:"-" }}
</td>
{% endif %}
...
...
circle/dashboard/views.py
View file @
1519d326
...
...
@@ -861,14 +861,9 @@ class GroupAclUpdateView(AclUpdateView):
logger
.
warning
(
'Tried to set permissions of
%
s by non-owner
%
s.'
,
unicode
(
instance
),
unicode
(
request
.
user
))
raise
PermissionDenied
()
name
=
request
.
POST
[
'perm-new-name'
]
if
(
User
.
objects
.
filter
(
username
=
name
)
.
count
()
+
Group
.
objects
.
filter
(
name
=
name
)
.
count
()
<
1
and
len
(
name
)
>
0
):
warning
(
request
,
_
(
'User or group "
%
s" not found.'
)
%
name
)
else
:
self
.
set_levels
(
request
,
instance
)
self
.
add_levels
(
request
,
instance
)
self
.
set_levels
(
request
,
instance
)
self
.
add_levels
(
request
,
instance
)
return
redirect
(
reverse
(
"dashboard.views.group-detail"
,
kwargs
=
self
.
kwargs
))
...
...
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