Initial views.
[ecs.git] / app / views / admin / participants / show.html.haml
blobd7b48455825bbf43efbe48442aa4776eb6178f6f
1 -#
2   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Heiko Bernloehr (FreeIT.de).
3   
4   This file is part of ECS.
5   
6   ECS is free software: you can redistribute it and/or modify it
7   under the terms of the GNU Affero General Public License as
8   published by the Free Software Foundation, either version 3 of
9   the License, or (at your option) any later version.
10   
11   ECS is distributed in the hope that it will be useful, but
12   WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   Affero General Public License for more details.
15   
16   You should have received a copy of the GNU Affero General Public
17   License along with ECS. If not, see <http://www.gnu.org/licenses/>.
20 %h1.box1 Show Participant
23   = link_to 'Edit', edit_admin_participant_path(:id => @participant)
24   |
25   = link_to 'Back', admin_participants_path
27 .normal-skip
28   %span.box5
29     %label.box4.table-resource-label(for="participant_name") Name:
30     = @participant.name
32 - unless @participant.dns.blank?
33   .small-skip
34     %span.box5
35       %label.box4.table-resource-label(for="participant_dns") DNS:
36       = @participant.dns
38 - unless @participant.email.blank?
39   .small-skip
40     %span.box5
41       %label.box4.table-resource-label(for="participant_email") Email:
42       = @participant.email
44 .small-skip
45   %span.box5
46     %label.box4.table-resource-label Community Selfrouting:
47     // = check_box_tag "participant[community_selfrouting]",1,@participant.community_selfrouting, :disabled => true
48     = @participant.community_selfrouting.to_s
50 .small-skip
51   %span.box5
52     %label.box4.table-resource-label Events:
53     // = check_box_tag "participant[community_selfrouting]",1,@participant.community_selfrouting, :disabled => true
54     = @participant.events?.to_s
56 - unless @participant.description.blank?
57   %p
58     .formular-input-width.table-border
59       .table-header
60         %label.table-resource-label Description (optional):
61       = @participant.description.gsub(/\r\n/, '<BR>')
63 - unless @participant.identities.blank?
64   %p
65     .show-output-width.table-border
66       .table-header
67         %label.table-resource-label Identities:
68     
69       %table.list(width="100%")
70         %tr(align="left")
71           %th ID:
72           %th Description:
73         - @participant.identities.each do |ident|
74           %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
75             %td= ident.name
76             %td= h(ident.description).gsub(/\r\n/, '<BR>')
78 - unless @participant.communities.blank?
79   %p
80     .show-output-width.table-border
81       .table-header
82         %label.table-resource-label Communities:
83     
84       %table.list(width="100%")
85         %tr(align="left")
86           %th Name:
87           %th Description:
88           %th(align="right") mid:
89         - @participant.communities.each do |comm|
90           %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
91             %td= link_to h(comm.name), admin_community_path(comm)
92             %td= h(comm.description).gsub(/\r\n/, '<BR>')
93             %td(align="right")= Membership.for_participant_id_and_community_id(@participant.id, comm.id)[0].id.to_s
96   = link_to 'Edit', edit_admin_participant_path(:id => @participant)
97   | 
98   = link_to 'Back', admin_participants_path
100 - unless (events = Event.for_participant(@participant,-1).uniq).blank?
101   %p
102     .show-output-width.table-border
103       .table-header
104         %label.table-resource-label Events:
105     
106       %table.list(width="100%")
107         %tr(align="left")
108           %th Id:
109           %th Message-Id:
110           %th Event-Type:
111           %th Date:
112         - events.each do |event|
113           %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
114             %td= event.id
115             %td= event.message.id
116             %td= event.ev_type.name
117             %td= event.updated_at
119 - unless (messages =  Message.for_participant_receiver(@participant).for_not_removed.uniq).blank?
120   %p
121     .show-output-width.table-border
122       .table-header
123         %label.table-resource-label Messages (Receiver):
124     
125       %table.list(width="100%")
126         %tr(align="left")
127           %th Id:
128           %th Resource:
129           %th Content-Type:
130           %th Date:
131         - messages.each do |msg|
132           %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
133             %td= msg.id
134             %td= msg.ressource.namespace+'/'+msg.ressource.ressource
135             %td= msg.content_type
136             %td= msg.created_at
138 - unless (messages =  Message.for_participant_sender(@participant).for_not_removed.uniq).blank?
139   %p
140     .show-output-width.table-border
141       .table-header
142         %label.table-resource-label Messages (Sender):
143     
144       %table.list(width="100%")
145         %tr(align="left")
146           %th Id:
147           %th Resource:
148           %th Content-Type:
149           %th Date:
150         - messages.each do |msg|
151           %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
152             %td= msg.id
153             %td= msg.ressource.namespace+'/'+msg.ressource.ressource
154             %td= msg.content_type
155             %td= msg.created_at