[issue #195] Change projects/sidebar to be more standart.
This commit is contained in:
parent
65e4e0f748
commit
401e570dc7
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue