-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.haml
59 lines (55 loc) · 2.33 KB
/
index.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
- include_stylesheet('admin/reader')
= render_region :top
#messages_table.outset
%table#messages.index{:cellspacing=>"0", :border=>"0", :cellpadding=>"0"}
%thead
%tr
- render_region :thead do |thead|
- thead.subject_header do
%th.message
= t('reader_extension.subject')
- thead.function_header do
%th.message_function
= t('reader_extension.function')
- thead.groups_header do
%th.message_groups
= t('reader_extension.groups')
- thead.sent_header do
%th.message_sent
= t('reader_extension.delivery_status')
- thead.modify_header do
%th.modify
= t('modify')
%tbody
- @messages.each do |message|
%tr
- render_region :tbody do |tbody|
- tbody.subject_cell do
%td.name
= link_to message.subject, admin_message_url(message), :class => message.has_function? ? "functional" : "normal"
- tbody.function_cell do
%td.message_function
- if message.administrative?
= t("message_functions.#{message.function}")
- tbody.groups_cell do
%td.message_groups
- if message.groups.any?
= message.groups.map(&:name).to_sentence
- tbody.sent_cell do
%td.message_sent
%p
- if message.sent_at
= t('reader_extension.last_sent')
= l(message.sent_at, :format => :short)
- else
= t('reader_extension.never_sent')
- tbody.modify_cell do
%td.actions
= link_to( image('delta') + ' ' + t('reader_extension.edit_message'), edit_admin_message_url(message), :class => "action" )
= link_to( image('minus') + ' ' + t('reader_extension.delete_message'), admin_message_url(message), {:method => :delete, :class => "action", :confirm => t('reader_extension.really_delete_message', :title => message.subject)})
- render_region :bottom do |bottom|
- bottom.buttons do
#actions
= pagination_for @messages
%ul
%li= link_to image('plus') + " " + "new message", new_admin_message_url