2 Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Heiko Bernloehr (FreeIT.de).
4 This file is part of ECS.
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.
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.
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)
25 = link_to 'Back', admin_participants_path
29 %label.box4.table-resource-label(for="participant_name") Name:
32 - unless @participant.dns.blank?
35 %label.box4.table-resource-label(for="participant_dns") DNS:
38 - unless @participant.email.blank?
41 %label.box4.table-resource-label(for="participant_email") Email:
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
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?
58 .formular-input-width.table-border
60 %label.table-resource-label Description (optional):
61 = @participant.description.gsub(/\r\n/, '<BR>')
63 - unless @participant.identities.blank?
65 .show-output-width.table-border
67 %label.table-resource-label Identities:
69 %table.list(width="100%")
73 - @participant.identities.each do |ident|
74 %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
76 %td= h(ident.description).gsub(/\r\n/, '<BR>')
78 - unless @participant.communities.blank?
80 .show-output-width.table-border
82 %label.table-resource-label Communities:
84 %table.list(width="100%")
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)
98 = link_to 'Back', admin_participants_path
100 - unless (events = Event.for_participant(@participant,-1).uniq).blank?
102 .show-output-width.table-border
104 %label.table-resource-label Events:
106 %table.list(width="100%")
112 - events.each do |event|
113 %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
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?
121 .show-output-width.table-border
123 %label.table-resource-label Messages (Receiver):
125 %table.list(width="100%")
131 - messages.each do |msg|
132 %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
134 %td= msg.ressource.namespace+'/'+msg.ressource.ressource
135 %td= msg.content_type
138 - unless (messages = Message.for_participant_sender(@participant).for_not_removed.uniq).blank?
140 .show-output-width.table-border
142 %label.table-resource-label Messages (Sender):
144 %table.list(width="100%")
150 - messages.each do |msg|
151 %tr{:class => [cycle('list-line-odd', 'list-line-even')]}
153 %td= msg.ressource.namespace+'/'+msg.ressource.ressource
154 %td= msg.content_type