diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-07 12:38:11 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-07 12:38:11 +0100 |
commit | b6285cf72c0e4ab4bf78ec4e10f109e6ea402876 (patch) | |
tree | 7cb6f6c6af469cc7073a01aaf0789e18a414dc3d /app | |
parent | dbaaad343f4abd6ca7904f6dfd0165ac0207b20e (diff) | |
download | ecs-b6285cf72c0e4ab4bf78ec4e10f109e6ea402876.tar.gz ecs-b6285cf72c0e4ab4bf78ec4e10f109e6ea402876.zip |
Initial views.
Diffstat (limited to 'app')
41 files changed, 1740 insertions, 10 deletions
diff --git a/app/views/admin/communities/_form.html.erb b/app/views/admin/communities/_form.html.erb new file mode 100644 index 0000000..e0587dd --- /dev/null +++ b/app/views/admin/communities/_form.html.erb @@ -0,0 +1,35 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<%= form.error_messages %> + +<p><label for="community_name" class="box2 table-resource-label">Name:</label> +<%= form.text_field :name %></p> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label for="community_description" class="table-resource-label">Description (optional):</label> +</div> +<%= form.text_area :description, :rows => 2 , :style => "width:99.5%" %> +</div> +</div> + diff --git a/app/views/admin/communities/edit.html.erb b/app/views/admin/communities/edit.html.erb new file mode 100644 index 0000000..e3bdd32 --- /dev/null +++ b/app/views/admin/communities/edit.html.erb @@ -0,0 +1,39 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Edit Community</h1> + +<p> +<%= link_to 'Show', admin_community_path(@community) %> | +<%= link_to 'Back', admin_communities_path %> +</p> + +<p> +<% form_for [:admin, @community], :method=>:put do |form| %> + <p><%= form.submit 'Save' %></p> + <%= render :partial => form %> + <p><%= form.submit 'Save' %></p> +<% end %> +</p> + +<p> +<%= link_to 'Show', admin_community_path(@community) %> | +<%= link_to 'Back', admin_communities_path %> +</p> diff --git a/app/views/admin/communities/index_nonparticipants.html.erb b/app/views/admin/communities/index_nonparticipants.html.erb new file mode 100644 index 0000000..3c8fc9d --- /dev/null +++ b/app/views/admin/communities/index_nonparticipants.html.erb @@ -0,0 +1,39 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Listing Participants to join Community "<%= @community.name+" ("+@community.description+")" %>" </h1> + +<%= link_to 'Back', index_admin_communities_path %><BR><BR> + +<%= render(:partial => 'shared/admin/participants', + :locals => + { + :links => + [ + { + :text=>"join Community", + :map_name_function=>'create_admin_community_participant_path(:id => @community.id, :p_id => participant.id), :method=>:post' + } + ] + } + ) +%> + +<BR><%= link_to 'Back', index_admin_communities_path %><BR> diff --git a/app/views/admin/communities/index_participants.html.erb b/app/views/admin/communities/index_participants.html.erb new file mode 100644 index 0000000..0275343 --- /dev/null +++ b/app/views/admin/communities/index_participants.html.erb @@ -0,0 +1,39 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Listing Participants of Community "<%= @community.name+" ("+@community.description+")" %>" </h1> + +<%= link_to 'Back', index_admin_communities_path %><BR><BR> + +<%= render(:partial => 'shared/admin/participants', + :locals => + { + :links => + [ + { + :text=>"release Participant", + :map_name_function=>'destroy_admin_community_participant_path(:id => @community.id, :p_id => participant.id), :method=>:delete, :confirm => \'Are you sure?\'' + } + ] + } + ) +%> + +<BR><%= link_to 'Back', index_admin_communities_path %><BR> diff --git a/app/views/admin/communities/list.html.erb b/app/views/admin/communities/list.html.erb new file mode 100644 index 0000000..6a3ff41 --- /dev/null +++ b/app/views/admin/communities/list.html.erb @@ -0,0 +1,52 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Listing Communities</h1> + +<%= link_to 'New community', new_admin_community_path %> + +<p> + +<table class="list"> + + <TR class="table-resource-label"> + <TH class="box2">Id</TH> + <TH class="box2">↑ Name</TH> + <TH class="box2">Description (optional)</TH> + <TH class="box2" align="center">Operations</TH> + </TR> + <tr></tr> + + <% for community in @communities.sort{|x,y| x.name.downcase <=> y.name.downcase}.each %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + <TD> <%= community.id %></TD> + <TD> <%= h community.name %> </TD> + <TD> <%= h truncate(community.description,:length => 80) %> </TD> + <TD> + <%= link_to 'Show', admin_community_path(:id => community) %> + <%= link_to 'Edit', edit_admin_community_path(:id => community) %> + <%= link_to 'Destroy', admin_community_path(:id => community), :confirm => 'Are you sure?', :method => :delete %><BR> + </TD> + </tr> + <% end %> + +</table> + +</p> diff --git a/app/views/admin/communities/new.html.erb b/app/views/admin/communities/new.html.erb new file mode 100644 index 0000000..a4cb4c1 --- /dev/null +++ b/app/views/admin/communities/new.html.erb @@ -0,0 +1,37 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">New Community</h1> + +<p> +<%= link_to 'Back', admin_communities_path %> +</p> + +<p> +<% form_for [:admin, @community], :method => :post do |form| %> + <p><%= form.submit "Create" %></p> + <%= render :partial => form %> + <p><%= form.submit "Create" %></p> +<% end %> +</p> + +<p> +<%= link_to 'Back', admin_communities_path %> +</p> diff --git a/app/views/admin/communities/show.html.erb,bak b/app/views/admin/communities/show.html.erb,bak new file mode 100644 index 0000000..4591dea --- /dev/null +++ b/app/views/admin/communities/show.html.erb,bak @@ -0,0 +1,80 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Show Community</h1> + +<%= link_to 'Edit', edit_admin_community_url(:id => @community) %> | +<%= link_to 'Back', admin_communities_url %> + +<p> + <label class="box2 table-resource-label">Name:</label> + <%= h @community.name %> +</p> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Description (optional):</label> +</div> + <%= h(@community.description).gsub(/\r\n/, '<BR>') %> +</div> +</div> +</p> + +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Participants:</label> +</div> + <%= h(@community.description).gsub(/\r\n/, '<BR>') %> +</div> +</div> +</p> + + +<table class="list"> + + <TR class="table-resource-label"> + <TH class="box2">Name</TH> + <TH class="box2">Description (optional)</TH> + </TR> + <tr></tr> + + <% for participant in Participant.for_community(@community) %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + <TD> <%= participant.id %></TD> + <TD> <%= h participant.name %> </TD> + <TD> <%= h truncate(participant.description,:length => 80) %> </TD> + <TD> + <%= link_to 'Show', admin_participant_path(:id => participant) %> + <%= link_to 'Edit', edit_admin_participant_path(:id => participant) %> + <%= link_to 'Destroy', admin_participant_path(:id => participant), :confirm => 'Are you sure?', :method => :delete %><BR> + </TD> + </tr> + <% end %> + +</table> + + +<p> +<%= link_to 'Edit', edit_admin_community_url(:id => @community) %> | +<%= link_to 'Back', admin_communities_url %> +</p> diff --git a/app/views/admin/communities/show.html.haml b/app/views/admin/communities/show.html.haml new file mode 100644 index 0000000..b5df2db --- /dev/null +++ b/app/views/admin/communities/show.html.haml @@ -0,0 +1,62 @@ +-# + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Heiko Bernloehr (FreeIT.de). + + This file is part of ECS. + + ECS is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + ECS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public + License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +%h1.box1 Show Community + +%p + = link_to 'Edit', edit_admin_community_path(:id => @community) + | + = link_to 'Back', admin_communities_path + +.normal-skip + %span.box5 + %label.box2.table-resource-label(for="community_name") Name: + = h @community.name + +- unless @community.description.blank? + %p + .formular-input-width.table-border + .table-header + %label.table-resource-label Description (optional): + = @community.description.gsub(/\r\n/, '<BR>') + +- unless (participants= Participant.for_community(@community)).blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Participants joining the community: + + %table.list(width="100%") + %tr(align="left") + %th ID: + %th Name: + %th Description: + %th(align="right") MembershipID (mid): + - participants.each do |participant| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= link_to h(participant.id), admin_participant_path(participant) + %td= participant.name + %td= h(participant.description).gsub(/\r\n/, '<BR>') + %td(align="right")= participant.mid(@community) + +%p + = link_to 'Edit', edit_admin_community_path(:id => @community) + | + = link_to 'Back', admin_communities_path + diff --git a/app/views/admin/communities/show.html.haml.bak b/app/views/admin/communities/show.html.haml.bak new file mode 100644 index 0000000..7a8f4b2 --- /dev/null +++ b/app/views/admin/communities/show.html.haml.bak @@ -0,0 +1,60 @@ +-# + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Heiko Bernloehr (FreeIT.de). + + This file is part of ECS. + + ECS is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + ECS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public + License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +%h1.box1 Show Community + +%p + = link_to 'Edit', edit_admin_community_url(:id => @community) + | + = link_to 'Back', admin_communities_url + +.normal-skip + %span.box5 + %label.box2.table-resource-label(for="community_name") Name: + = h @community.name + +- unless @community.description.blank? + %p + .formular-input-width.table-border + .table-header + %label.table-resource-label Description (optional): + = @community.description.gsub(/\r\n/, '<BR>') + +- unless (participants= Participant.for_community(@community)).blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Participants joining this community: + + %table.list(width="100%") + %tr(align="left") + %th ID: + %th Name: + %th Description: + - participants.each do |participant| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= link_to h(participant.id), admin_participant_path(participant) + %td= participant.name + %td= h(participant.description).gsub(/\r\n/, '<BR>') + +%p + = link_to 'Edit', edit_admin_community_url(:id => @community) + | + = link_to 'Back', admin_communities_url + diff --git a/app/views/admin/identities/description:text.html.erb b/app/views/admin/identities/description:text.html.erb new file mode 100644 index 0000000..8f88247 --- /dev/null +++ b/app/views/admin/identities/description:text.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Admin::Identities#description:text</h1> +<p>Find me in app/views/admin/identities/description:text.html.erb</p> diff --git a/app/views/admin/identities/name:string.html.erb b/app/views/admin/identities/name:string.html.erb new file mode 100644 index 0000000..38118dd --- /dev/null +++ b/app/views/admin/identities/name:string.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Admin::Identities#name:string</h1> +<p>Find me in app/views/admin/identities/name:string.html.erb</p> diff --git a/app/views/admin/identity/description:text.html.erb b/app/views/admin/identity/description:text.html.erb new file mode 100644 index 0000000..847011e --- /dev/null +++ b/app/views/admin/identity/description:text.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Admin::Identity#description:text</h1> +<p>Find me in app/views/admin/identity/description:text.html.erb</p> diff --git a/app/views/admin/identity/name:string.html.erb b/app/views/admin/identity/name:string.html.erb new file mode 100644 index 0000000..7c6df02 --- /dev/null +++ b/app/views/admin/identity/name:string.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Admin::Identity#name:string</h1> +<p>Find me in app/views/admin/identity/name:string.html.erb</p> diff --git a/app/views/admin/organizations/_form.html.erb b/app/views/admin/organizations/_form.html.erb new file mode 100644 index 0000000..4998137 --- /dev/null +++ b/app/views/admin/organizations/_form.html.erb @@ -0,0 +1,44 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<%= form.error_messages %> + + +<table> +<tr> +<td><label for="organization_name" class="box2 table-resource-label">Name:</label></td> +<td><%= h form.text_field :name %></td> +</tr> +<tr> +<td><label for="organization_abrev" class="box2 table-resource-label">Abreviation:</label></td> +<td><%= h form.text_field :abrev %></td> +</tr> +</table> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label for="organization_description" class="table-resource-label">Description (optional):</label> +</div> +<%= h form.text_area :description, :rows => 2 , :style => "width:99.5%" %> +</div> +</div> + diff --git a/app/views/admin/organizations/edit.html.erb b/app/views/admin/organizations/edit.html.erb new file mode 100644 index 0000000..967cf8c --- /dev/null +++ b/app/views/admin/organizations/edit.html.erb @@ -0,0 +1,39 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Edit Organization</h1> + +<p> +<%= link_to 'Show', admin_organization_path(@organization)%> | +<%= link_to 'Back', admin_organizations_path %> +</p> + +<p> +<% form_for [:admin, @organization], :method => :put do |form| %> + <p><%= form.submit 'Save' %></p> + <%= render :partial => form %> + <p><%= form.submit 'Save' %></p> +<% end %> +</p> + +<p> +<%= link_to 'Show', admin_organization_path(@organization)%> | +<%= link_to 'Back', admin_organizations_path %> +</p> diff --git a/app/views/admin/organizations/list.html.erb b/app/views/admin/organizations/list.html.erb new file mode 100644 index 0000000..6f801b9 --- /dev/null +++ b/app/views/admin/organizations/list.html.erb @@ -0,0 +1,54 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Listing Organizations</h1> + +<%= link_to 'New organizations', :action => 'new' %> + +<p> + +<table class="list"> + + <TR class="table-resource-label"> + <TH class="box2">ID</TH> + <TH class="box2">Name</TH> + <TH class="box2">↑ Abreviation</TH> + <TH class="box2">Description</TH> + <TH class="box2" align="center">Operations</TH> + </TR> + <tr></tr> + + <% for organization in @organizations.sort{|x,y| x.abrev.downcase <=> y.abrev.downcase} %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + <TD> <%= organization.id %></TD> + <TD> <%= h organization.name %> </TD> + <TD class="center"> <%= h organization.abrev %> </TD> + <TD> <%= h truncate(organization.description, :length => 80) %> </TD> + <TD> + <%= link_to 'Show', admin_organization_path(organization) %> + <%= link_to 'Edit', edit_admin_organization_path(organization) %> + <%= link_to 'Destroy', { :action => 'destroy', :id => organization }, :confirm => 'Are you sure?', :method => :delete %> + </TD> + </tr> + <% end %> + +</table> + +</p> diff --git a/app/views/admin/organizations/new.html.erb b/app/views/admin/organizations/new.html.erb new file mode 100644 index 0000000..211c939 --- /dev/null +++ b/app/views/admin/organizations/new.html.erb @@ -0,0 +1,37 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">New Abreviation</h1> + +<p> +<%= link_to 'Back', admin_organizations_path %> +</p> + +<p> +<% form_for [:admin, @organization] do |form| %> + <p><%= form.submit "Create" %></p> + <%= render :partial => form %> + <p><%= form.submit "Create" %></p> +<% end %> +</p> + +<p> +<%= link_to 'Back', admin_organizations_path %> +</p> diff --git a/app/views/admin/organizations/show.html.erb b/app/views/admin/organizations/show.html.erb new file mode 100644 index 0000000..08971e5 --- /dev/null +++ b/app/views/admin/organizations/show.html.erb @@ -0,0 +1,50 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Show Organization</h1> + +<%= link_to 'Edit', edit_admin_organization_path(@organization) %> | +<%= link_to 'Back', admin_organizations_path %> + +<p> + <label class="box2 table-resource-label">Name:</label> + <%= @organization.name %> +</p> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Description (optional):</label> +</div> + <%= h(@organization.description).gsub(/\r\n/, '<BR>') %> +</div> +</div> +</p> + +<p> + <label class="box2 table-resource-label">Abrev.:</label> + <%= @organization.abrev %> +</p> + +<p> +<%= link_to 'Edit', edit_admin_organization_path(@organization) %> | +<%= link_to 'Back', admin_organizations_path %> +</p> diff --git a/app/views/admin/participants/_form.html.erb b/app/views/admin/participants/_form.html.erb new file mode 100644 index 0000000..13e920d --- /dev/null +++ b/app/views/admin/participants/_form.html.erb @@ -0,0 +1,120 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<%= form.error_messages %> + +<p><label for="participant_name" class="box2 table-resource-label">Name:</label> +<%= form.text_field :name %></p> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Description (optional):</label> +</div> +<%= form.text_area :description, :rows => 2 , :style => "width:99.5%" %> +</div> +</div> + +<p> +<table> +<tr> +<td><label for="participant_dns" class="box2 table-resource-label">DNS:</label></td> +<td><%= form.text_field :dns %></td> +</tr> +<tr> +<td><label for="participant_email" class="box2 table-resource-label">Email:</label></td> +<td><%= form.text_field :email %></td> +</tr> +</table> +</p> + +<p><label for="participant_organization_id" class="box2 table-resource-label">Organization-Abreviation:</label> +<%= form.collection_select(:organization_id, @organizations, :id, :orgtext) %></p> + +<p><label for="participant_community_selfrouting" class="box2 table-resource-label">Community Selfrouting:</label> +<%= form.check_box :community_selfrouting %></p> + +<p><label for="participant_events_" class="box2 table-resource-label">Events:</label> +<%= form.check_box :events_ %></p> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Authentication-IDs:</label> +</div> + <table border="0" frame="box" rules="none" valign="top" width="100%"> + <tr align="left"> + <th style="width:30%">ID:</th> + <th style="width:60%">Description (optional):</th> + <th style="width:10%">delete</th> + </tr> + <% form.fields_for :identities do |ident| %> + <tr align="left" valign="top"> + <td><%= ident.text_field :name, :style => "width:100%" %></td> + <TD><%= ident.text_area :description, :rows => 1, :style => "width:100%" %></TD> + <% unless ident.object.new_record? %> + <td valign='middle'> + <%= ident.check_box :_destroy %> + <!-- %= ident.label :_delete, 'delete' %> --> + </td> + <% else %> + <td></td> + <% end %> + </tr> + <% end %> + </table> +</div> +</div> + +<p> +<div class="formular-input-width"> +<div class="table-border"> +<div class="table-header"> + <label class="table-resource-label">Communities:</label> +</div> + <!-- <table border="1" frame="box" rules="all" valign="top"> --> + <table class="list" width="100%"> + + <tr align="left"> + <th>Name:</th> + <th>Description (optional):</th> + <th>join</th> + </tr> + + <% Community.find(:all).each do |community| %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + <!-- <tr align="left" valign="top"> --> + <TD> + <%= link_to h(community.name), admin_community_path(community) %> + </TD> + <TD> + <%= h(community.description).gsub(/\r\n/,'<BR />') %> + </TD> + <td valign='middle'> + <%= check_box_tag "participant[community_ids][]", community.id, @participant.communities.include?(community) %> + </td> + </tr> + <% end %> + </table> +</div> +</div> +</p> diff --git a/app/views/admin/participants/edit.html.erb b/app/views/admin/participants/edit.html.erb new file mode 100644 index 0000000..0f3b322 --- /dev/null +++ b/app/views/admin/participants/edit.html.erb @@ -0,0 +1,38 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Edit Participant</h1> + +<P> +<%= link_to 'Show', admin_participant_path(:id => @participant) %> | +<%= link_to 'Back', admin_participants_path %> +</P> +<P> +<% form_for [:admin, setup_participant(@participant)], :method=>:put do |f| %> + <p><%= f.submit 'Save' %></p> + <%= render :partial => f %> + <p><%= f.submit 'Save' %><p> +<% end %> +</P> + +<P> +<%= link_to 'Show', admin_participant_path(:id => @participant) %> | +<%= link_to 'Back', admin_participants_path %> +</P> diff --git a/app/views/admin/participants/index_communities.html.erb b/app/views/admin/participants/index_communities.html.erb new file mode 100644 index 0000000..1434700 --- /dev/null +++ b/app/views/admin/participants/index_communities.html.erb @@ -0,0 +1,40 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Listing Communities of Participant "<%= @participant.name %>" </h1> + +<%= link_to 'Back', index_admin_participants_path %><BR><BR> + +<%= render(:partial => 'shared/admin/communities', + :locals => + { + :links => + [ + { + :text=>"leave Community", + :map_name_function=>'destroy_admin_participant_community_path(:id => @participant.id, :c_id => community.id), :method=>:delete, :confirm => \'Are you sure?\'' + } + ] + } + ) +%> + +<BR><%= link_to 'Back', index_admin_participants_path %><BR> + diff --git a/app/views/admin/participants/index_noncommunities.html.erb b/app/views/admin/participants/index_noncommunities.html.erb new file mode 100644 index 0000000..cea40e8 --- /dev/null +++ b/app/views/admin/participants/index_noncommunities.html.erb @@ -0,0 +1,40 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Listing Communities to join for Participant "<%= @participant.name %>" </h1> + +<%= link_to 'Back', index_admin_participants_path %><BR><BR> + +<%= render(:partial => 'shared/admin/communities', + :locals => + { + :links => + [ + { + :text=>"join Community", + :map_name_function=>'create_admin_participant_community_path(:id => @participant.id, :c_id => community.id), :method=>:post' + } + ] + } + ) +%> + +<BR><%= link_to 'Back', index_admin_participants_path %><BR> + diff --git a/app/views/admin/participants/list.html.haml b/app/views/admin/participants/list.html.haml new file mode 100644 index 0000000..0bf37db --- /dev/null +++ b/app/views/admin/participants/list.html.haml @@ -0,0 +1,64 @@ +-# + Copyright (C) 2007, 2013 Heiko Bernloehr (FreeIT.de). + + This file is part of ECS. + + ECS is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + ECS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public + License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +%h1.box1 Listing Participants (#{@list_participants_count.to_s}) + +.text-link= link_to 'New participant', new_admin_participant_path +- if @list_anonymous + .text-link= link_to "Hide anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "false") +- else + .text-link= link_to "Show anonymous (#{@list_participants_anonymous_count})", admin_participants_path(:anonymous => "true") + +%p + %table.list + %tr.table-resource-label + %th.box2 ↑ OrgAbrev: + %th.box2 ID: + %th.box2 ↑ Name: + %th.box2 Description (optional): + %th.box2 Self-<br/>routing: + %th.box2 Events: + %th.box2(align="center")= "Links, Actions(#{link_to_actions_toggle_on_off(@list_anonymous, @action_buttons)})" + %tr + + - @participants.group_by(&:organization_id).sort{|x,y| Organization.find(x[0]).abrev.downcase <=> Organization.find(y[0]).abrev.downcase}.each do |orgid,participants| + - org_printed= false + - participants.sort{|x,y| x.name.downcase <=> y.name.downcase}.each do |participant| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + - if org_printed + %td.center " + - else + %td= Organization.find(orgid).abrev + %td.center= participant.id + %td= h participant.name + %td= truncate(participant.description, :length => 80) + %td.center= check_box_tag "participant[community_selfrouting]",1,participant.community_selfrouting, :disabled => true + %td.center= check_box_tag "participant[events_]",1,participant.events_, :disabled => true + %td + %table + %tr + %td + = link_to 'Show', admin_participant_path(:id => participant) + = link_to 'Edit', edit_admin_participant_path(:id => participant) + + %td + = button_to_reset(participant, @list_anonymous, @action_buttons) + %td + = button_to_delete(participant, @list_anonymous, @action_buttons) + - org_printed= true diff --git a/app/views/admin/participants/new.html.erb b/app/views/admin/participants/new.html.erb new file mode 100644 index 0000000..d00b3cb --- /dev/null +++ b/app/views/admin/participants/new.html.erb @@ -0,0 +1,37 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">New Participant</h1> + +<p> +<%= link_to 'Back', admin_participants_path %> +</p> + +<p> +<% form_for [:admin, @participant] do |f| %> + <p><%= f.submit "Create" %></p> + <%= render :partial => f %> + <p><%= f.submit "Create" %></p> +<% end %> +</p> + +<p> +<%= link_to 'Back', admin_participants_path %> +</p> diff --git a/app/views/admin/participants/show.html.haml b/app/views/admin/participants/show.html.haml new file mode 100644 index 0000000..d7b4845 --- /dev/null +++ b/app/views/admin/participants/show.html.haml @@ -0,0 +1,156 @@ +-# + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Heiko Bernloehr (FreeIT.de). + + This file is part of ECS. + + ECS is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + ECS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public + License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +%h1.box1 Show Participant + +%p + = link_to 'Edit', edit_admin_participant_path(:id => @participant) + | + = link_to 'Back', admin_participants_path + +.normal-skip + %span.box5 + %label.box4.table-resource-label(for="participant_name") Name: + = @participant.name + +- unless @participant.dns.blank? + .small-skip + %span.box5 + %label.box4.table-resource-label(for="participant_dns") DNS: + = @participant.dns + +- unless @participant.email.blank? + .small-skip + %span.box5 + %label.box4.table-resource-label(for="participant_email") Email: + = @participant.email + +.small-skip + %span.box5 + %label.box4.table-resource-label Community Selfrouting: + // = check_box_tag "participant[community_selfrouting]",1,@participant.community_selfrouting, :disabled => true + = @participant.community_selfrouting.to_s + +.small-skip + %span.box5 + %label.box4.table-resource-label Events: + // = check_box_tag "participant[community_selfrouting]",1,@participant.community_selfrouting, :disabled => true + = @participant.events?.to_s + +- unless @participant.description.blank? + %p + .formular-input-width.table-border + .table-header + %label.table-resource-label Description (optional): + = @participant.description.gsub(/\r\n/, '<BR>') + +- unless @participant.identities.blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Identities: + + %table.list(width="100%") + %tr(align="left") + %th ID: + %th Description: + - @participant.identities.each do |ident| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= ident.name + %td= h(ident.description).gsub(/\r\n/, '<BR>') + +- unless @participant.communities.blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Communities: + + %table.list(width="100%") + %tr(align="left") + %th Name: + %th Description: + %th(align="right") mid: + - @participant.communities.each do |comm| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= link_to h(comm.name), admin_community_path(comm) + %td= h(comm.description).gsub(/\r\n/, '<BR>') + %td(align="right")= Membership.for_participant_id_and_community_id(@participant.id, comm.id)[0].id.to_s + +%p + = link_to 'Edit', edit_admin_participant_path(:id => @participant) + | + = link_to 'Back', admin_participants_path + +- unless (events = Event.for_participant(@participant,-1).uniq).blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Events: + + %table.list(width="100%") + %tr(align="left") + %th Id: + %th Message-Id: + %th Event-Type: + %th Date: + - events.each do |event| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= event.id + %td= event.message.id + %td= event.ev_type.name + %td= event.updated_at + +- unless (messages = Message.for_participant_receiver(@participant).for_not_removed.uniq).blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Messages (Receiver): + + %table.list(width="100%") + %tr(align="left") + %th Id: + %th Resource: + %th Content-Type: + %th Date: + - messages.each do |msg| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= msg.id + %td= msg.ressource.namespace+'/'+msg.ressource.ressource + %td= msg.content_type + %td= msg.created_at + +- unless (messages = Message.for_participant_sender(@participant).for_not_removed.uniq).blank? + %p + .show-output-width.table-border + .table-header + %label.table-resource-label Messages (Sender): + + %table.list(width="100%") + %tr(align="left") + %th Id: + %th Resource: + %th Content-Type: + %th Date: + - messages.each do |msg| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + %td= msg.id + %td= msg.ressource.namespace+'/'+msg.ressource.ressource + %td= msg.content_type + %td= msg.created_at + diff --git a/app/views/admin/ressources/_form.html.erb b/app/views/admin/ressources/_form.html.erb new file mode 100644 index 0000000..70ac2f5 --- /dev/null +++ b/app/views/admin/ressources/_form.html.erb @@ -0,0 +1,48 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<%= form.error_messages %> + +<table> +<tr> +<td><label for="ressource_namespace" class="box2 table-resource-label">Namespace:</label></td> +<td><%= h form.text_field :namespace %></td> +</tr> + +<tr> +<td><label for="ressource_ressource" class="box2 table-resource-label">Name:</label></td> +<td><%= h form.text_field :ressource %></td> +</tr> + +<tr></tr> +<tr> +<td><label for="ressource_postrouted" class="box2 table-resource-label">Postrouted:</label></td> +<td><%= h form.check_box :postroute %></td> +</tr> + +<tr></tr> +<tr></tr> +<tr> +<td><label for="ressource_events" class="box2 table-resource-label">Events:</label></td> +<td><%= h form.check_box :events %></td> +</tr> +</table> + + diff --git a/app/views/admin/ressources/edit.html.erb b/app/views/admin/ressources/edit.html.erb new file mode 100644 index 0000000..d225c58 --- /dev/null +++ b/app/views/admin/ressources/edit.html.erb @@ -0,0 +1,39 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Edit Ressource</h1> + +<P> +<%= link_to 'Show', admin_ressource_path(@ressource) %> | +<%= link_to 'Back', admin_ressources_path %> +</P> + +<P> +<% form_for [:admin, setup_ressource(@ressource)], :method=>:put do |f| %> + <p><%= f.submit 'Edit' %></p> + <%= render :partial => f %> + <p><%= f.submit 'Edit' %></p> +<% end %> +</P> + +<P> +<%= link_to 'Show', admin_ressource_path(@ressource) %> | +<%= link_to 'Back', admin_ressources_path %> +</P> diff --git a/app/views/admin/ressources/list.html.haml b/app/views/admin/ressources/list.html.haml new file mode 100644 index 0000000..77cf336 --- /dev/null +++ b/app/views/admin/ressources/list.html.haml @@ -0,0 +1,51 @@ +-# + Copyright (C) 2007, 2013 Heiko Bernloehr (FreeIT.de). + + This file is part of ECS. + + ECS is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of + the License, or (at your option) any later version. + + ECS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public + License along with ECS. If not, see <http://www.gnu.org/licenses/>. + + +%h1.box1 Listing Ressources (#{@list_ressources_count.to_s}) + +.text-link= link_to 'New resource', new_admin_ressource_path + +%p + %table.list + %tr.table-resource-label + %th.box2 ↑ Namespace + %th.box2 ID + %th.box2 ↑ Name + %th.box2 Postrouted + %th.box2 Events + %th.box2(align="center") Operations: + %tr + + - @ressources.group_by(&:namespace).sort{|x,y| x[0].downcase <=> y[0].downcase}.each do |ns, ressources| + - ns_printed= false + - ressources.sort{|x,y| x.ressource.downcase <=> y.ressource.downcase}.each do |ressource| + %tr{:class => [cycle('list-line-odd', 'list-line-even')]} + -if ns_printed + %td.center " + - else + %td #{ns} + %td.center= ressource.id + %td= h ressource.ressource + %td.center= check_box_tag "ressource[postroute]",1,ressource.postroute, :disabled => true + %td.center= check_box_tag "ressource[events]",1,ressource.events, :disabled => true + %td + = link_to 'Show', admin_ressource_path(:id => ressource) + = link_to 'Edit', edit_admin_ressource_path(:id => ressource) + = link_to 'Destroy', admin_ressource_path(:id => ressource), :confirm => 'Are you sure?', :method => :delete + - ns_printed= true diff --git a/app/views/admin/ressources/new.html.erb b/app/views/admin/ressources/new.html.erb new file mode 100644 index 0000000..5f961d4 --- /dev/null +++ b/app/views/admin/ressources/new.html.erb @@ -0,0 +1,37 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">New Ressource</h1> + +<p> +<%= link_to 'Back', admin_ressources_path %> +</p> + +<p> +<% form_for [:admin, @ressource] do |form| %> + <p><%= form.submit "Create" %></p> + <%= render :partial => form %> + <p><%= form.submit "Create" %></p> +<% end %> +</p> + +<p> +<%= link_to 'Back', admin_ressources_path %> +</p> diff --git a/app/views/admin/ressources/show.html.erb b/app/views/admin/ressources/show.html.erb new file mode 100644 index 0000000..9a751a3 --- /dev/null +++ b/app/views/admin/ressources/show.html.erb @@ -0,0 +1,47 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1 class="box1">Show Ressource</h1> + +<%= link_to 'Edit', edit_admin_ressource_path(:id => @ressource) %> | +<%= link_to 'Back', admin_ressources_path %> + +<P> + <label class="box2 table-resource-label">Namespace:</label> + <%= @ressource.namespace %> +</P> + +<P> + <label class="box2 table-resource-label">Name:</label> + <%=h(@ressource.ressource).gsub(/\r\n/, '<BR>') %> +</P> + +<P> + <label class="box2 table-resource-label">Postrouted:</label> + <%= check_box_tag "ressource[postroute]",1,@ressource.postroute, :disabled => true %> +</P> + +<P> + <label class="box2 table-resource-label">Events:</label> + <%= check_box_tag "ressource[events]",1,@ressource.events, :disabled => true %> +</P> + +<%= link_to 'Edit', edit_admin_ressource_path(:id => @ressource) %> | +<%= link_to 'Back', admin_ressources_path %> diff --git a/app/views/configs/create.html.erb b/app/views/configs/create.html.erb new file mode 100644 index 0000000..52a9380 --- /dev/null +++ b/app/views/configs/create.html.erb @@ -0,0 +1,2 @@ +<h1>Configs#create</h1> +<p>Find me in app/views/configs/create.html.erb</p> diff --git a/app/views/configs/index.html.erb b/app/views/configs/index.html.erb new file mode 100644 index 0000000..df50741 --- /dev/null +++ b/app/views/configs/index.html.erb @@ -0,0 +1,2 @@ +<h1>Configs#index</h1> +<p>Find me in app/views/configs/index.html.erb</p> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb new file mode 100644 index 0000000..e4a8b0b --- /dev/null +++ b/app/views/events/index.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Events#index</h1> +<p>Find me in app/views/events/index.html.erb</p> diff --git a/app/views/identities/description:text.html.erb b/app/views/identities/description:text.html.erb new file mode 100644 index 0000000..fa400ea --- /dev/null +++ b/app/views/identities/description:text.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Identities#description:text</h1> +<p>Find me in app/views/identities/description:text.html.erb</p> diff --git a/app/views/identities/name:string.html.erb b/app/views/identities/name:string.html.erb new file mode 100644 index 0000000..bcbd93d --- /dev/null +++ b/app/views/identities/name:string.html.erb @@ -0,0 +1,22 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<h1>Identities#name:string</h1> +<p>Find me in app/views/identities/name:string.html.erb</p> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 07e372b..1d7404a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1,47 @@ -<!DOCTYPE html> -<html> -<head> - <title>Ecs4</title> - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> - <%= csrf_meta_tags %> -</head> -<body> +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. -<%= yield %> +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> + <title>Admin: <%= controller.action_name %></title> + <%= stylesheet_link_tag 'scaffold' %> + <%= stylesheet_link_tag 'ecs' %> +</head> +<body id=ecs> + <div id="banner"> +<!-- <IMG SRC="/images/rails_small.png" ALT="ecs-Logo"/> --> + <%= "ECS -- Elearning Community Server" %> + </div> + <%= render(:partial => "shared/main_menu_line") %> + <div id="main"> + <% if flash[:notice] -%> + <div id="notice"> + <%= flash[:notice] %> + </div> + <!-- <p style="color: green"><%= flash[:notice] %></p> --> + <% end -%> + <%= yield %> + </div> </body> </html> diff --git a/app/views/numlab/exercises/index.rjson b/app/views/numlab/exercises/index.rjson new file mode 100644 index 0000000..7157c71 --- /dev/null +++ b/app/views/numlab/exercises/index.rjson @@ -0,0 +1,3 @@ +for li in (@list.class == Array) ? @list : ([] << @list) + li.body +end diff --git a/app/views/shared/_breadcrumbs_line.html.erb b/app/views/shared/_breadcrumbs_line.html.erb new file mode 100644 index 0000000..880272c --- /dev/null +++ b/app/views/shared/_breadcrumbs_line.html.erb @@ -0,0 +1,23 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<div id="breadcrumbs"> + <%= render_navigation :renderer => :breadcrumbs, :join_with => " > " %> +</div> diff --git a/app/views/shared/_main_menu_line.html.erb b/app/views/shared/_main_menu_line.html.erb new file mode 100644 index 0000000..57cf86a --- /dev/null +++ b/app/views/shared/_main_menu_line.html.erb @@ -0,0 +1,23 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<div id="menu"> + <%= render_navigation %> +</div> diff --git a/app/views/shared/admin/_communities.html.erb b/app/views/shared/admin/_communities.html.erb new file mode 100644 index 0000000..5204d9a --- /dev/null +++ b/app/views/shared/admin/_communities.html.erb @@ -0,0 +1,48 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + +<table> + +<% for community in @communities %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + + <TD> + <SPAN class="list-title"><%= h community.id %></SPAN><BR/> + </TD> + + <TD> + <SPAN class="list-title"><%= h community.name %></SPAN><BR/> + <%= h truncate(community.description,:length => 80) %> + </TD> + + + <TD> + <%= link_to 'Show', show_admin_community_path(:id => community) %> + <%= link_to 'Edit', edit_admin_community_path(:id => community) %> + <%= link_to 'Destroy', destroy_admin_community_path(:id => community), :confirm => 'Are you sure?', :method => :delete %><BR> + <% if defined? links then -%> + <% links.each do |link| %> + <%= eval "link_to \"#{link[:text]}\", #{link[:map_name_function]}" %> + <% end -%> + <% end -%> + </TD> + </tr> +<% end %> +</table> diff --git a/app/views/shared/admin/_participants.html.erb b/app/views/shared/admin/_participants.html.erb new file mode 100644 index 0000000..76a9896 --- /dev/null +++ b/app/views/shared/admin/_participants.html.erb @@ -0,0 +1,58 @@ +<!-- +Copyright (C) 2007, 2008, 2009, 2010 Heiko Bernloehr (FreeIT.de). + +This file is part of ECS. + +ECS is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of +the License, or (at your option) any later version. + +ECS is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with ECS. If not, see <http://www.gnu.org/licenses/>. +--> + + + +<table> + +<% for participant in participants %> + <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> + + <TD> + <SPAN class="list-title"><%= h participant.id %></SPAN><BR/> + </TD> + + <TD> + <SPAN class="list-title"><%= h participant.name %></SPAN><BR/> + <%= h truncate(participant.description,:length => 80) %> + </TD> + + + <TD> + <%= link_to 'Show', show_admin_participant_path(:id => participant) %> + <%= link_to 'Edit', edit_admin_participant_path(:id => participant) %> + <%= link_to 'Destroy', destroy_admin_participant_path(:id => participant), :confirm => 'Are you sure?', :method => :post %><BR> + <% if defined? links then -%> + <% links.each do |link| %> + <%= eval "link_to \"#{link[:text]}\", #{link[:map_name_function]}" %> + <% end -%> + <% end -%> + </TD> + </tr> +<% end %> +</table> + +<!-- +<#%= link_to 'Previous page', { :page => @community_pages.current.previous } if @community_pages.current.previous %> +<#%= link_to 'Next page', { :page => @community_pages.current.next } if @community_pages.current.next %> + +<br /> + +<#%= link_to 'New community', :action => 'new' %> + --> |