Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9c872704
authored
Mar 06, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add add_user skeleton to GroupDetails
parent
345ff036
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
circle/dashboard/templates/dashboard/group-detail.html
+1
-1
circle/dashboard/views.py
+7
-1
No files found.
circle/dashboard/templates/dashboard/group-detail.html
View file @
9c872704
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<td><a
data-groupmember-pk=
"{{i.pk}}"
href=
"{% url "
dashboard
.
views
.
remove-user
"
user_pk=
i.pk
group_pk=
group.pk
%}?
next=
{{
request
.
path
}}"
class=
"real-link groupmember-delete btn btn-link btn-xs"
><i
class=
"icon-remove"
><span
class=
"sr-only"
>
{% trans "remove" %}
</span></i></a></td></tr>
<td><a
data-groupmember-pk=
"{{i.pk}}"
href=
"{% url "
dashboard
.
views
.
remove-user
"
user_pk=
i.pk
group_pk=
group.pk
%}?
next=
{{
request
.
path
}}"
class=
"real-link groupmember-delete btn btn-link btn-xs"
><i
class=
"icon-remove"
><span
class=
"sr-only"
>
{% trans "remove" %}
</span></i></a></td></tr>
{% endfor %}
{% endfor %}
<tr><td><i
class=
"icon-plus"
></i></td>
<tr><td><i
class=
"icon-plus"
></i></td>
<td><input
type=
"text"
class=
"form-control"
name=
"
perm
-new-name"
<td><input
type=
"text"
class=
"form-control"
name=
"
list
-new-name"
placeholder=
"{% trans "
Name
of
user
"
%}"
></td>
placeholder=
"{% trans "
Name
of
user
"
%}"
></td>
</tr>
</tr>
</tbody>
</tbody>
...
...
circle/dashboard/views.py
View file @
9c872704
...
@@ -593,9 +593,15 @@ class GroupDetailView(CheckedDetailView):
...
@@ -593,9 +593,15 @@ class GroupDetailView(CheckedDetailView):
return
context
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
if
request
.
POST
.
get
(
'new_name'
):
if
request
.
POST
.
get
(
'new_name'
):
return
self
.
__set_name
(
request
)
return
self
.
__set_name
(
request
)
if
request
.
POST
.
get
(
'list-new-name'
):
return
self
.
__add_user
(
request
)
def
__add_user
(
self
,
request
):
self
.
object
=
self
.
get_object
()
return
redirect
(
reverse_lazy
(
"dashboard.views.group-detail"
,
kwargs
=
{
'pk'
:
self
.
object
.
pk
}))
def
__set_name
(
self
,
request
):
def
__set_name
(
self
,
request
):
self
.
object
=
self
.
get_object
()
self
.
object
=
self
.
get_object
()
...
...
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