Merge pull request #192 from foodcoop-adam/cleanup-stale
Cleanup unused views&controllers
This commit is contained in:
commit
768796407f
12 changed files with 0 additions and 234 deletions
|
@ -1,33 +0,0 @@
|
|||
class MembershipsController < ApplicationController
|
||||
before_filter :authenticate_membership_or_admin
|
||||
|
||||
def add_member
|
||||
user = User.find(params[:user_id])
|
||||
Membership.create(:group => @group, :user => user)
|
||||
redirect_to :action => 'reload', :id => @group
|
||||
end
|
||||
|
||||
def drop_member
|
||||
begin
|
||||
Membership.find(params[:membership_id]).destroy
|
||||
if User.find(@current_user.id).role_admin?
|
||||
redirect_to :action => 'reload', :id => @group
|
||||
else
|
||||
# If the user drops himself from admin group
|
||||
flash[:notice] = MESG_NO_ADMIN_ANYMORE
|
||||
render(:update) {|page| page.redirect_to :controller => "index"}
|
||||
end
|
||||
rescue => error
|
||||
flash[:error] = error.to_s
|
||||
redirect_to :action => 'reload', :id => @group
|
||||
end
|
||||
end
|
||||
|
||||
def reload
|
||||
render :update do |page|
|
||||
page.replace_html 'members', :partial => 'shared/memberships/current_members', :object => @group
|
||||
page.replace_html 'non_members', :partial => 'shared/memberships/non_members', :object => @group
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -1,32 +0,0 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
|
||||
%title= t '.title', title: (yield(:title) or controller.controller_name)
|
||||
= stylesheet_link_tag 'application'
|
||||
= stylesheet_link_tag "print", :media => "print"
|
||||
<!--[if lte IE 7]>
|
||||
= stylesheet_link_tag 'ie_hacks'
|
||||
<![endif]-->
|
||||
= javascript_include_tag 'application'
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
#logininfo= render :partial => 'shared/loginInfo'
|
||||
|
||||
#header
|
||||
#logo
|
||||
= link_to root_path do
|
||||
= t('layouts.logo').html_safe
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodsoftConfig[:name]
|
||||
#nav= render :partial => 'layouts/main_tabnav'
|
||||
|
||||
#main
|
||||
#content
|
||||
- flash.each do |name, msg|
|
||||
= content_tag :h3, msg, :id => "flash#{name.to_s.camelize}", :class => "flash #{name}"
|
||||
#loader{:style => "display:none;"}= image_tag("loader.gif", :border => 0)
|
||||
- if show_title?
|
||||
%h1= yield(:title)
|
||||
= yield
|
||||
#ajax_box(style="display:none")
|
|
@ -1,4 +0,0 @@
|
|||
%ul.autocomplete
|
||||
- for article in @articles
|
||||
- supplier = @supplier ? "" : " - #{truncate(article.supplier.name)}"
|
||||
%li{:id => article.id.to_s}= "#{article.name} (#{article.unit_quantity} * #{article.unit} | #{number_to_currency(article.price)}#{supplier})"
|
|
@ -1,5 +0,0 @@
|
|||
<ul class="autocomplete">
|
||||
<% for user in @users do -%>
|
||||
<li><span class="nick"><%=h user.nick %></span><span class="informal"> (<%= user.ordergroup.name.to_s if user.ordergroup %>)</span></li>
|
||||
<% end -%>
|
||||
</ul>
|
|
@ -1,9 +0,0 @@
|
|||
%ul
|
||||
%li
|
||||
= image_tag 'b_user.png' , :size => '7x10', :border => 0, :alt => t('.profile')
|
||||
= link_to h(@current_user.nick), my_profile_path, { :title => t('.edit_profile') }
|
||||
- if FoodsoftConfig[:homepage]
|
||||
%li= link_to FoodsoftConfig[:name], FoodsoftConfig[:homepage], { :title => t('.homepage_title') }
|
||||
%li= link_to t('.help'), FoodsoftConfig[:help_url]
|
||||
%li= link_to t('.feedback.title'), new_feedback_path, :title => t('.feedback.desc')
|
||||
%li= link_to t('.logout'), logout_path
|
|
@ -1,21 +0,0 @@
|
|||
<% if flash[:error] %>
|
||||
<h3 class="error" id="flashError" ><%= flash[:error] %></h3>
|
||||
<%= javascript_tag("new Effect.Highlight('flashError', {delay:0.8, duration:1});") -%>
|
||||
<% end %>
|
||||
|
||||
<% memberships = @group.memberships
|
||||
if memberships.size != 0 %>
|
||||
<ul style="">
|
||||
<% for membership in memberships %>
|
||||
<li style="margin-left:-15px">
|
||||
<b><%= membership.user.nick %></b> (<%=h membership.user.first_name + ' ' + membership.user.last_name %>)
|
||||
| <%= link_to_remote t('.drop'),
|
||||
:url => { :controller => '/memberships', :action => 'drop_member', :id => @group, :membership_id => membership },
|
||||
:before => "Element.show('loader')",
|
||||
:success => "Element.hide('loader')" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<p><i><%= t('.no_members', group: @group.name) %></i></p>
|
||||
<% end %>
|
|
@ -1,23 +0,0 @@
|
|||
<h1><%=h t('.title', group: @group.name) %></h1>
|
||||
<p>
|
||||
<i><%= t('.desc', link: remote_link_to(t('.invite'), :url => new_invite_path(:id => @group))).html_safe %></i>
|
||||
</p>
|
||||
<div class="left_column" style="width:48%">
|
||||
<div class="box_title">
|
||||
<h2><%= t('.already_members') %></h2>
|
||||
</div>
|
||||
<div class="column_content" id="members">
|
||||
<%=render :partial => 'shared/memberships/current_members' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_column" style="width:48%">
|
||||
<div class="box_title">
|
||||
<h2><%= t('.no_members_yet') %></h2>
|
||||
</div>
|
||||
<div class="column_content" id="non_members">
|
||||
<%= render :partial => 'shared/memberships/non_members' %>
|
||||
<%= remote_link_to(t('.invite_someone'), :url => new_invite_path(:id => @group)) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="edit_box" style="display:none"></div>
|
|
@ -1,11 +0,0 @@
|
|||
<ul>
|
||||
<% for user in @group.non_members %>
|
||||
<li>
|
||||
<b><%= user.nick %></b> (<%=h user.first_name + ' ' + user.last_name %>)
|
||||
| <%= link_to_remote t('.add'),
|
||||
:url => { :controller => '/memberships', :action => 'add_member', :id => @group, :user_id => user },
|
||||
:before => "Element.show('loader')",
|
||||
:success => "Element.hide('loader')" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -906,8 +906,6 @@ de:
|
|||
ordering:
|
||||
confirm_change: Änderungen an dieser Bestellung gehen verloren, wenn zu einer anderen Bestellung gewechselt wird. Möchtest Du trotzdem wechseln?
|
||||
layouts:
|
||||
application1:
|
||||
title: Foodsoft - %{title}
|
||||
email:
|
||||
footer: ! '--
|
||||
|
||||
|
@ -1369,28 +1367,6 @@ de:
|
|||
search_user: Nach Nutzerin suchen
|
||||
title: Wöchentliche Jobs
|
||||
user_not_found: Keine Nutzerin gefunden
|
||||
loginInfo:
|
||||
edit_profile: Profil bearbeiten
|
||||
feedback:
|
||||
desc: Fehler gefunden? Vorschlag? Idee? Kritik?
|
||||
title: Feedback
|
||||
help: Hilfe
|
||||
homepage_title: Foodcoop Homepage besuchen
|
||||
logout: Abmelden
|
||||
profile: Profil
|
||||
memberships:
|
||||
current_members:
|
||||
drop: entfernen
|
||||
no_members: ! '%{group} hat keine Mitglieder.'
|
||||
members:
|
||||
already_members: Sind schon Mitglieder
|
||||
desc: Hier kannst Du Mitglieder der Gruppe verwalten oder ein neues Foodcoop-Mitglied in die Gruppe %{link}.
|
||||
invite: einladen
|
||||
invite_someone: Person einladen
|
||||
no_members_yet: Sind noch keine Mitglieder
|
||||
title: Mitglieder von %{group}
|
||||
non_members:
|
||||
add: hinzufügen
|
||||
open_orders:
|
||||
ending: Ende
|
||||
no_open_orders: Derzeit gibt es keine laufenden Bestellungen
|
||||
|
|
|
@ -907,8 +907,6 @@ en:
|
|||
ordering:
|
||||
confirm_change: Modifications to this order will be lost when you change the order. Do you want to lose the changes you made and continue?
|
||||
layouts:
|
||||
application1:
|
||||
title: Foodsoft - %{title}
|
||||
email:
|
||||
footer: ! '--
|
||||
|
||||
|
@ -1370,28 +1368,6 @@ en:
|
|||
search_user: Search user
|
||||
title: Weekly jobs
|
||||
user_not_found: No user found
|
||||
loginInfo:
|
||||
edit_profile: Edit profile
|
||||
feedback:
|
||||
desc: Found a bug? Suggestions? Review?
|
||||
title: Feedback
|
||||
help: Help
|
||||
homepage_title: Visit Foodcoop Homepage
|
||||
logout: Logout
|
||||
profile: Profile
|
||||
memberships:
|
||||
current_members:
|
||||
drop: remove
|
||||
no_members: ! '%{group} has no members.'
|
||||
members:
|
||||
already_members: Are already members
|
||||
desc: Here you can manage members of the group or invite a new Foodcoop-member to the group %{link}.
|
||||
invite: invite
|
||||
invite_someone: Invite someone
|
||||
no_members_yet: Are not members yet
|
||||
title: Members of %{group}
|
||||
non_members:
|
||||
add: add
|
||||
open_orders:
|
||||
ending: Ending
|
||||
no_open_orders: There are no current orders
|
||||
|
|
|
@ -932,8 +932,6 @@ fr:
|
|||
ordering:
|
||||
confirm_change:
|
||||
layouts:
|
||||
application1:
|
||||
title: Foodsoft - %{title}
|
||||
email:
|
||||
footer: ! '--
|
||||
|
||||
|
@ -1376,28 +1374,6 @@ fr:
|
|||
search_user: Rechercher par utilisatrice
|
||||
title: Boulots hebdomadaires
|
||||
user_not_found: Aucune utilisatrice n'a été trouvée.
|
||||
loginInfo:
|
||||
edit_profile: Modifier le profil
|
||||
feedback:
|
||||
desc: Tu as détecté une erreur? Tu as des propositions, des idées, des critiques?
|
||||
title: Retours
|
||||
help: Aide
|
||||
homepage_title: Vers la page d'accueil de la bouffecoop
|
||||
logout: Te déconnecter
|
||||
profile: Profil
|
||||
memberships:
|
||||
current_members:
|
||||
drop: désinscrire
|
||||
no_members: ! '%{group} n''a aucun membre pour le moment.'
|
||||
members:
|
||||
already_members: Sont déjà membre
|
||||
desc: Sur cette page, tu peux gérer les membres de l'équipe, et aussi %{link} un nouveau membre.
|
||||
invite: engrainer
|
||||
invite_someone: Inviter quelqu'unE
|
||||
no_members_yet: Ne sont pas encore membre
|
||||
title: Membre de %{group}
|
||||
non_members:
|
||||
add: ajouter
|
||||
open_orders:
|
||||
ending: Clôture le
|
||||
no_open_orders: Il n'y a aucune commande en cours en ce moment
|
||||
|
|
|
@ -903,8 +903,6 @@ nl:
|
|||
ordering:
|
||||
confirm_change:
|
||||
layouts:
|
||||
application1:
|
||||
title: Foodsoft - %{title}
|
||||
email:
|
||||
footer: ! '--
|
||||
|
||||
|
@ -1303,28 +1301,6 @@ nl:
|
|||
search_user: Gebruiker zoeken
|
||||
title: Wekelijkse taken
|
||||
user_not_found: Geen gebruiker gevonden
|
||||
loginInfo:
|
||||
edit_profile: Profiel aanpassen
|
||||
feedback:
|
||||
desc: Fout gevonden? Opmerking? Idee?
|
||||
title: Feedback
|
||||
help: Help
|
||||
homepage_title: Foodcoop startpagina bezoeken
|
||||
logout: Uitloggen
|
||||
profile: Profiel
|
||||
memberships:
|
||||
current_members:
|
||||
drop: verwijderen
|
||||
no_members: ! '%{group} heeft geen leden.'
|
||||
members:
|
||||
already_members: Zijn al lid
|
||||
desc:
|
||||
invite: uitnodiging
|
||||
invite_someone: Iemand uitnodigen
|
||||
no_members_yet: Zijn nog geen lid
|
||||
title: Leden van %{group}
|
||||
non_members:
|
||||
add: toevoegen
|
||||
open_orders:
|
||||
ending: Einde
|
||||
no_open_orders: Er zijn momenteel geen lopende bestellingen.
|
||||
|
|
Loading…
Reference in a new issue