Skip to content
Extraits de code Groupes Projets
Valider da8ec589 rédigé par Daniel Vincent Grippi's avatar Daniel Vincent Grippi
Parcourir les fichiers

RS, DG; display the correct tab on manage, change edit to manage

parent a7c6e22e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -53,8 +53,8 @@ class AspectsController < ApplicationController ...@@ -53,8 +53,8 @@ class AspectsController < ApplicationController
respond_with @aspect respond_with @aspect
end end
def edit def manage
@aspects = current_user.aspects @aspect = :manage
@remote_requests = Request.for_user current_user @remote_requests = Request.for_user current_user
end end
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
module ApplicationHelper module ApplicationHelper
def current_aspect?(aspect) def current_aspect?(aspect)
@aspect != :all && @aspect.id == aspect.id !@aspect.is_a?(Symbol) && @aspect.id == aspect.id
end end
def object_path(object, opts = {}) def object_path(object, opts = {})
......
Fichier déplacé
...@@ -68,26 +68,7 @@ ...@@ -68,26 +68,7 @@
%li= link_to "logout", destroy_user_session_path %li= link_to "logout", destroy_user_session_path
= render "shared/aspect_nav" = render "shared/aspect_nav"
= render "shared/sub_header"
#aspect_header
.container
.span-5.last
- if @person
%h1
= @person.real_name
- else
- if @aspect == :all
%h1
= link_to "All Aspects", root_path
- else
%h1
= link_to @aspect.name, @aspect
.page_title
= yield :page_title
.span-19.last{ :style => "position:relative;" }
= yield :publish
.container .container
.span-5.last .span-5.last
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
%li{:class => ("selected" if @aspect == :all)} %li{:class => ("selected" if @aspect == :all)}
= link_to "All Aspects", root_url = link_to "All Aspects", root_url
%li{ :style => "margin-right:0;" } %li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)}
= link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), edit_aspect_path(Aspect.first), :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects" = link_to ( (@request_count == 0)? "manage" : "manage (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => "Manage your Aspects"
.yo{ :style => "display:none;"} .yo{ :style => "display:none;"}
#add_aspect_pane #add_aspect_pane
......
#aspect_header
.container
.span-5.last
- if @person
%h1
= @person.real_name
- else
%h1
- if @aspect == :all
= link_to "All Aspects", root_path
- elsif @aspect == :manage
= link_to "Manage Aspects", root_path
- else
= link_to @aspect.name, @aspect
.page_title
= yield :page_title
.span-19.last{ :style => "position:relative;" }
= yield :publish
...@@ -27,7 +27,8 @@ Diaspora::Application.routes.draw do ...@@ -27,7 +27,8 @@ Diaspora::Application.routes.draw do
resources :photos, :except => [:index] resources :photos, :except => [:index]
resources :albums resources :albums
resources :aspects match 'aspects/manage', :to => 'aspects#manage'
resources :aspects, :except => [:edit]
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends' match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend' match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter