Child: [f2849a] (diff)

Download this file

project_permissions.html    54 lines (48 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends g.theme.master %}
{% do g.register_forge_css('css/forge/deck.css') %}
{% block title %}{{c.project.name}} / Permissions {% endblock %}
{% block header %}Project Permissions{% endblock %}
{% block content %}
<form method="POST" action="update">
{% for row in permissions|dictsort|batch(4) %}
{% set i0=loop.index0 %}
<div class="fourcol">
{% for name, ids in row %}
{% set i1 = i0*4 + loop.index0 %}
{{c.card.display(
index=i1,
id=name,
name=name,
items=h.make_roles(ids),
icon_name='perm_' + name,
)}}
{% endfor %}
<br style="clear:both"/>
</div>
{% endfor %}
<hr/>
<p class="clearfix">
<input type="submit" value="Save">
<a href="" class="btn link cancel">Cancel</a>
</p>
</form>
{{c.admin_modal.display(content='<h1 id="popup_title"></h1><div id="popup_contents"></div>')}}
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
var $popup_title = $('#popup_title');
var $popup_contents = $('#popup_contents');
$('a.admin_modal').click(function(){
var link = this;
console.debug($(link).html())
$popup_title.html('');
$popup_contents.html('Loading...');
$.get(link.href, function (data) {
console.debug(data)
$popup_title.html($(link).html());
$popup_contents.html(data);
});
});
$('#sortable').sortable({items: ".fleft"});
</script>
{% endblock %}