Initial views.
[ecs.git] / app / views / admin / participants / _form.html.erb
blob13e920daf6ac8941824b9568320e4d97ad70b8d4
1 <!--
2 Copyright (C) 2007, 2008, 2009, 2010 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/>.
18 -->
21 <%= form.error_messages %>
23 <p><label for="participant_name" class="box2 table-resource-label">Name:</label>
24 <%= form.text_field :name %></p>
26 <p>
27 <div class="formular-input-width">
28 <div class="table-border">
29 <div class="table-header">
30   <label class="table-resource-label">Description (optional):</label>
31 </div>
32 <%= form.text_area :description, :rows => 2 , :style => "width:99.5%" %>
33 </div>
34 </div>
36 <p>
37 <table>
38 <tr>
39 <td><label for="participant_dns" class="box2 table-resource-label">DNS:</label></td>
40 <td><%= form.text_field :dns %></td>
41 </tr>
42 <tr>
43 <td><label for="participant_email" class="box2 table-resource-label">Email:</label></td>
44 <td><%= form.text_field :email %></td>
45 </tr>
46 </table>
47 </p>
49 <p><label for="participant_organization_id" class="box2 table-resource-label">Organization-Abreviation:</label>
50 <%= form.collection_select(:organization_id, @organizations, :id, :orgtext) %></p>
52 <p><label for="participant_community_selfrouting" class="box2 table-resource-label">Community Selfrouting:</label>
53 <%= form.check_box :community_selfrouting %></p>
55 <p><label for="participant_events_" class="box2 table-resource-label">Events:</label>
56 <%= form.check_box :events_ %></p>
58 <p>
59 <div class="formular-input-width">
60 <div class="table-border">
61 <div class="table-header">
62   <label class="table-resource-label">Authentication-IDs:</label>
63 </div>
64   <table border="0" frame="box" rules="none" valign="top" width="100%">
65     <tr align="left">
66       <th style="width:30%">ID:</th>
67       <th style="width:60%">Description (optional):</th>
68       <th style="width:10%">delete</th>
69     </tr>
70     <% form.fields_for :identities do |ident| %>
71       <tr align="left" valign="top">
72         <td><%= ident.text_field :name, :style => "width:100%" %></td>
73         <TD><%= ident.text_area :description, :rows => 1, :style => "width:100%" %></TD>
74         <% unless ident.object.new_record? %>
75             <td valign='middle'>
76             <%= ident.check_box :_destroy %>
77             <!-- %= ident.label :_delete, 'delete' %> -->
78             </td>
79         <% else %>
80             <td></td>
81         <% end %>
82       </tr>
83     <% end %>
84   </table>
85 </div>
86 </div>
88 <p>
89 <div class="formular-input-width">
90 <div class="table-border">
91 <div class="table-header">
92   <label class="table-resource-label">Communities:</label>
93 </div>
94   <!-- <table border="1" frame="box" rules="all" valign="top"> -->
95   <table class="list" width="100%">
96   
97     <tr align="left">
98       <th>Name:</th>
99       <th>Description (optional):</th>
100       <th>join</th>
101     </tr>
102   
103     <% Community.find(:all).each do |community| %>
104             <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>">
105   <!--      <tr align="left" valign="top"> -->
106           <TD>
107             <%= link_to h(community.name), admin_community_path(community) %>
108           </TD>
109           <TD>
110             <%= h(community.description).gsub(/\r\n/,'<BR />') %>
111           </TD>
112           <td valign='middle'>
113             <%= check_box_tag "participant[community_ids][]", community.id, @participant.communities.include?(community) %> 
114           </td>
115         </tr>
116     <% end %>
117   </table>
118 </div>
119 </div>
120 </p>