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
0e7d8bb6
authored
Sep 23, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: link parent in tempate form
previous way was kinda ugly
parent
75c9b228
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
circle/dashboard/templates/dashboard/template-edit.html
+7
-10
circle/dashboard/views/template.py
+1
-0
No files found.
circle/dashboard/templates/dashboard/template-edit.html
View file @
0e7d8bb6
...
...
@@ -23,18 +23,15 @@
{% csrf_token %}
{{ form.name|as_crispy_field }}
<a
{%
if
form
.
parent
.
value
%}
href=
"{% url "
dashboard
.
views
.
template-detail
"
pk=
form.parent.value
%}"
<strong>
{% trans "Parent template" %}:
</strong>
{% if parent %}
<a
href=
"{% url "
dashboard
.
views
.
template-detail
"
pk=
parent.pk
%}"
>
{{ parent.name }}
</a>
{% else %}
disabled
%}
-
{% endif %}
class=
"btn btn-default pull-right"
style=
"margin-top: 24px;"
>
{% trans "Visit" %}
<i
class=
"fa fa-arrow-circle-right"
></i>
</a>
<div
style=
"width: 80%;"
>
{{ form.parent|as_crispy_field }}
</div>
<fieldset
class=
"resources-sliders"
>
<legend>
{% trans "Resource configuration" %}
</legend>
...
...
circle/dashboard/views/template.py
View file @
0e7d8bb6
...
...
@@ -300,6 +300,7 @@ class TemplateDetail(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
context
[
'disks'
]
=
obj
.
disks
.
all
()
context
[
'is_owner'
]
=
obj
.
has_level
(
self
.
request
.
user
,
'owner'
)
context
[
'aclform'
]
=
AclUserOrGroupAddForm
()
context
[
'parent'
]
=
obj
.
parent
return
context
def
get_success_url
(
self
):
...
...
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