[issue #195] Change projects/sidebar to be more standart.

This commit is contained in:
George Vinogradov 2012-03-22 04:42:56 +04:00
parent 65e4e0f748
commit 401e570dc7
3 changed files with 18 additions and 17 deletions

View File

@ -1,18 +1,20 @@
- act = action_name.to_sym
- contr = controller_name.to_sym
- content_for :sidebar do
%aside
.admin-preferences
%ul
- if can? :edit, @project
%li{:class => (act == :edit && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.edit"), edit_project_path(@project)
- if can? :manage_collaborators, @project
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.sections"), sections_project_path(@project)
- if can? :manage_collaborators, @project
%li{:class => (act == :edit && contr == :collaborators) ? 'active' : ''}
= link_to t("layout.projects.edit_collaborators"), edit_project_collaborators_path(@project)
- act = action_name.to_sym
- contr = controller_name.to_sym
%aside
.admin-preferences
%ul
- if can? :edit, @project
%li{:class => (act == :edit && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.edit"), edit_project_path(@project)
- if can? :manage_collaborators, @project
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.sections"), sections_project_path(@project)
- if can? :manage_collaborators, @project
%li{:class => (act == :edit && contr == :collaborators) ? 'active' : ''}
= link_to t("layout.projects.edit_collaborators"), edit_project_collaborators_path(@project)
-#.block.notice

View File

@ -1,4 +1,5 @@
= render :partial => 'projects/submenu'
= render :partial => 'projects/sidebar'
= form_for @project, :html => { :class => :form, :multipart => true } do |f|
= render :partial => "form", :locals => {:f => f}
@ -10,4 +11,3 @@
= link_to t("layout.delete"), project_path(@project), :method => :delete, :confirm => t("layout.projects.confirm_delete"), :class => 'button' if can? :destroy, @project
.both
- content_for :sidebar, render('sidebar')

View File

@ -1,4 +1,5 @@
= render :partial => 'projects/submenu'
= render :partial => 'projects/sidebar'
= form_for @project, :url => sections_project_path(@project), :method => :post, :html => { :class => :form, :multipart => true } do |f|
.leftside.w25
@ -23,8 +24,6 @@
= submit_tag t("layout.save"), :class => 'button'
.both
- content_for :sidebar, render('sidebar')
:javascript
// TODO: Replace this temporary hack by something more true
$('.right').addClass('bigpadding');