forked from radar/rboard
/
index.html.haml
79 lines (79 loc) · 3.45 KB
/
index.html.haml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.breadcrumbs
= link_to t(:Administration_Section), admin_root_path
\» #{link_to @object, [:admin, @object]} » #{t(:Permissions)}
%h2
= t(:Permissions)
for #{@object}
- if @object.is_a?(Group)
%h3= t(:Global_Permissions)
= link_to "Edit Global Permissions", edit_admin_group_path(@object)
%table.listing{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"}
%thead
%tr
%td= t(:can_see_forum?)
%td= t(:can_see_category?)
%td= t(:can_reply_to_topics?)
%td= t(:can_start_new_topics?)
%tbody
%tr{ :class => "even"}
%td= theme_image_tag(@object.permissions.global.can_see_forum?.to_s + ".jpg")
%td= theme_image_tag(@object.permissions.global.can_see_category?.to_s + ".jpg")
%td= theme_image_tag(@object.permissions.global.can_reply_to_topics?.to_s + ".jpg")
%td= theme_image_tag(@object.permissions.global.can_start_new_topics?.to_s + ".jpg")
%br
- if @forum_count.zero?
%h3= t(:No_forums_to_assign_specific_permissions_to)
%h3= t(:Forum_specific_permissions)
= link_to t(:New, :thing => t(:Forum_specific_permissions)), new_admin_group_permission_path(@object, :type => "forum")
%table.listing{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"}
- if @object.permissions.forums.empty?
%thead
%tr
%td
%b= t(:No_forum_specific_permissions)
- else
%thead
%tr
%td
%td= t(:Title)
%td= t(:can_see_forum?)
%td= t(:can_see_category?)
%td= t(:can_reply_to_topics?)
%td= t(:can_start_new_topics?)
%tbody
- for permission in @object.permissions.forums
%td
= link_to theme_image_tag("edit.jpg"), [:edit, :admin, @object, permission]
= link_to theme_image_tag("delete.jpg"), [:admin, @object, permission], :method => "delete", :confirm => t(:confirm_deletion, :thing => "permission")
%td= permission.forum
%td= theme_image_tag(permission.can_see_forum?.to_s + ".jpg")
%td= theme_image_tag(permission.can_see_category?.to_s + ".jpg")
%td= theme_image_tag(permission.can_reply_to_topics?.to_s + ".jpg")
%td= theme_image_tag(permission.can_start_new_topics?.to_s + ".jpg")
%br
- if @category_count.zero?
%h3= t(:No_categories_to_assign_specific_permissions_to)
- else
%h3= t(:Category_specific_permissions)
= link_to t(:New, :thing => t(:Category_specific_permissions)), new_admin_group_permission_path(@object, :type => "category")
%table.list-table{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"}
- if @object.permissions.categories.empty?
%thead
%tr
%td
%b= t(:No_category_specific_permissions)
- else
%thead
%tr
%td= t(:Title)
%td= t(:can_see_forum?)
%td= t(:can_see_category?)
%td= t(:can_reply_to_topics?)
%td= t(:can_start_new_topics?)
%tbody
- for permission in @object.permissions.forums
%td= permission.forum
%td= theme_image_tag(permission.can_see_forum?.to_s + ".jpg")
%td= theme_image_tag(permission.can_see_category?.to_s + ".jpg")
%td= theme_image_tag(permission.can_reply_to_topics?.to_s + ".jpg")
%td= theme_image_tag(permission.can_start_new_topics?.to_s + ".jpg")