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
0613eec6
authored
Apr 17, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add operation templates
parent
43ab9d9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
10 deletions
+52
-10
circle/dashboard/templates/dashboard/_base.html
+20
-0
circle/dashboard/templates/dashboard/_modal.html
+12
-0
circle/dashboard/templates/dashboard/operate.html
+15
-0
circle/dashboard/templates/dashboard/vm-detail/_operations.html
+5
-10
No files found.
circle/dashboard/templates/dashboard/_base.html
0 → 100644
View file @
0613eec6
{% extends "dashboard/base.html" %}
{% load i18n %}
{% block content %}
<div
class=
"body-content"
>
<div
class=
"panel panel-default"
style=
"margin-top: 60px;"
>
<div
class=
"panel-heading"
>
<h3
class=
"no-margin"
>
{% if title %}
{{ title }}
{% else %}
{% trans "Confirmation" %}
{% endif %}
</h3>
</div>
<div
class=
"panel-body"
>
{{ body|safe|default:"(body missing from context.)" }}
</div>
</div>
{% endblock %}
circle/dashboard/templates/dashboard/_modal.html
0 → 100644
View file @
0613eec6
{% load i18n %}
<div
class=
"modal fade"
id=
"confirmation-modal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-body"
>
{{ body|safe|default:"(body missing from context.)" }}
<div
class=
"clearfix"
></div>
</div>
<div
class=
"clearfix"
></div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
circle/dashboard/templates/dashboard/operate.html
0 → 100644
View file @
0613eec6
{% load i18n %}
<p>
{% blocktrans with obj=object op=op.name %}
Do you want to do the following operation on {{obj}}:
<strong>
{{op}}
</strong>
?
{% endblocktrans %}
</p>
<p
class=
"text-info"
>
{{op.name}}: {{op.description}}
</p>
<div
class=
"pull-right"
>
<form
method=
"POST"
action=
"{{url}}"
>
{% csrf_token %}
<a
class=
"btn btn-default"
href=
"{{object.get_absolute_url}}"
data-dismiss=
"modal"
>
{% trans "Cancel" %}
</a>
<button
class=
"btn btn-danger"
type=
"submit"
>
{% if op.icon %}
<i
class=
"icon-{{op.icon}}"
></i>
{% endif %}{{ op|capfirst }}
</button>
</form>
circle/dashboard/templates/dashboard/vm-detail/_operations.html
View file @
0613eec6
{% load i18n %}
{% load i18n %}
{% for op in ops %}
{% for op in ops %}
<form
style=
"display: inline;"
method=
"POST"
action=
"{% url "
dashboard
.
views
.
detail
"
pk=
instance.pk
%}"
class=
"operation operation-{{op.id}}"
>
<a
href=
"{{op.get_url}}"
class=
"operation operation-{{op.op}} btn btn-default btn-xs"
{% csrf_token %}
title=
"{{op.name}}: {{op.description}}"
>
<input
type=
"hidden"
name=
"{{op.id}}"
/>
<i
class=
"icon-{{op.icon}}"
></i>
<button
title=
"{{op.name}}: {{op.description}}"
class=
"btn btn-default btn-xs"
type=
"submit"
><i
class=
"icon-{{op.icon|default:'cog'}}"
></i></button>
<span
class=
"sr-only"
>
{{op.name}}
</span>
</form>
{% endfor %}
{% if user.is_superuser %}
<a
title=
"Migrate"
data-vm-pk=
"{{ instance.pk }}"
href=
"{% url "
dashboard
.
views
.
vm-migrate
"
pk=
instance.pk
%}"
class=
"btn btn-default btn-xs vm-migrate"
>
<i
class=
"icon-truck"
></i>
</a>
</a>
{% end
if
%}
{% end
for
%}
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