-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #196 from RaghavPro/import_settings
ability to import/export admin settings
- Loading branch information
Showing
4 changed files
with
113 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 31 additions & 17 deletions
48
cleansweep/plugins/committees/templates/committee_structures.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,43 @@ | ||
|
||
{% extends "admin/base.html" %} | ||
|
||
{% block content_head %} | ||
<div class="page-content"> | ||
<ul class="breadcrumb breadcrumb-collapse"> | ||
<li><a href="{{url_for('admin')}}">Admin Center</a></li> | ||
<li></li> | ||
</ul> | ||
<h2>Committee Structures</h2> | ||
</div> | ||
<div class="page-content"> | ||
<ul class="breadcrumb breadcrumb-collapse"> | ||
<li><a href="{{ url_for('admin') }}">Admin Center</a></li> | ||
<li></li> | ||
</ul> | ||
<h2>Committee Structures</h2> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block content_body %} | ||
<div class="list-group"> | ||
{% for p in place.type.all() %} | ||
{% set committees_count = place.committee_types.filter_by(place_type_id=p.id).count() %} | ||
<a href="{{ url_for(".committee_structures_by_level", level=p.short_name)}}" class="list-group-item" | ||
{% if committees_count == 0 %} | ||
style="background: #eee;" | ||
title="No committee structures are defined at this level." | ||
{% endif %} | ||
> | ||
{{ p.name }} | ||
<span class="badge">{{ committees_count }}</span> | ||
</a> | ||
<a href="{{ url_for(".committee_structures_by_level", level=p.short_name) }}" class="list-group-item" | ||
{% if committees_count == 0 %} | ||
style="background: #eee;" | ||
title="No committee structures are defined at this level." | ||
{% endif %} | ||
> | ||
{{ p.name }} | ||
<span class="badge">{{ committees_count }}</span> | ||
</a> | ||
{% endfor %} | ||
</div> | ||
<div> | ||
<a class="btn btn-primary" href="{{ url_for('.export_committee_structures') }}">Export</a> | ||
<div class="pull-right"> | ||
{% if has_permission("committees.import") %} | ||
<form action="{{ url_for('.import_committee_structures') }}" enctype="multipart/form-data" method="post"> | ||
<div class="input-group" style="width: 300px"> | ||
<input type="file" name="file" class="form-control"> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-primary" type="submit">Import</button> | ||
</span> | ||
</div> | ||
</form> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters