Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions remoteappmanager/templates/admin/accounting.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ <h3>User applications - {{ user.name }}</h3>
{% endblock %}

{% block dialogs %}
{% call modal('Action', btn_label='OK') %}
{% call macros.modal_dlg('Action', btn_label='OK') %}
{% endcall %}
{% call modal('Create New Policy', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
{% call macros.modal_dlg('Create New Policy', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
<form>
<input type="hidden" id="user_name" value="{{ user.name }}">
<div class="form-group">
Expand Down
4 changes: 2 additions & 2 deletions remoteappmanager/templates/admin/applications.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ <h3>Applications</h3>
{% endblock %}

{% block dialogs %}
{% call modal('Action', btn_label='OK') %}
{% call macros.modal_dlg('Action', btn_label='OK') %}
{% endcall %}
{% call modal('Create New', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
{% call macros.modal_dlg('Create New', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
<form>
<label for="image-name">Image name</label>
<input type="text" class="form-control" id="image-name">
Expand Down
2 changes: 1 addition & 1 deletion remoteappmanager/templates/admin/containers.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3>Currently Running Containers</h3>
{% endblock %}

{% block dialogs %}
{% call modal('Action', btn_label='OK') %}
{% call macros.modal_dlg('Action', btn_label='OK') %}
{% endcall %}
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions remoteappmanager/templates/admin/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ <h3>Users</h3>
{% endblock %}

{% block dialogs %}
{% call modal('Action', btn_label='OK') %}
{% call macros.modal_dlg('Action', btn_label='OK') %}
{% endcall %}
{% call modal('Create New', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
{% call macros.modal_dlg('Create New', btn_label='OK', btn_class="btn-primary", buttons_dismiss=false) %}
<form>
<label for="user-name">User name</label>
<input type="text" class="form-control" id="user-name">
Expand Down
22 changes: 22 additions & 0 deletions remoteappmanager/templates/macros.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% macro modal_dlg(title, btn_label=None, btn_class="btn-primary", modal_class="", buttons_dismiss=true) %}
{% set key = title.replace(' ', '-').lower() %}
{% set btn_label = btn_label or title %}
<div class="modal fade {{ modal_class }}" id="{{key}}-dialog" tabindex="-1" role="dialog" aria-labelledby="{{key}}-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close modal-close" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="{{key}}-label">{{title}}</h4>
</div>
<div class="modal-body">
{{ caller() }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default modal-close" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}>Cancel</button>
<button type="button" class="btn {{btn_class}} primary" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}>{{btn_label}}</button>
</div>
</div>
</div>
</div>
{% endmacro %}

24 changes: 2 additions & 22 deletions remoteappmanager/templates/page.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
{% macro modal(title, btn_label=None, btn_class="btn-primary", modal_class="", buttons_dismiss=true) %}
{% set key = title.replace(' ', '-').lower() %}
{% set btn_label = btn_label or title %}
<div class="modal fade {{ modal_class }}" id="{{key}}-dialog" tabindex="-1" role="dialog" aria-labelledby="{{key}}-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close modal-close" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="{{key}}-label">{{title}}</h4>
</div>
<div class="modal-body">
{{ caller() }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default modal-close" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}>Cancel</button>
<button type="button" class="btn {{btn_class}} primary" {% if buttons_dismiss %}data-dismiss="modal"{% endif %}>{{btn_label}}</button>
</div>
</div>
</div>
</div>
{% endmacro %}
{% import 'macros.html' as macros %}

<!DOCTYPE HTML>
<html>
Expand Down Expand Up @@ -116,7 +96,7 @@ <h4 class="modal-title" id="{{key}}-label">{{title}}</h4>
{% block main %}
{% endblock %}

{% call modal('Error', btn_label='OK') %}
{% call macros.modal_dlg('Error', btn_label='OK') %}
<div class="ajax-error">
The error
</div>
Expand Down