[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
|
- content_for :sidebar do
|
||||||
- contr = controller_name.to_sym
|
|
||||||
|
|
||||||
%aside
|
- act = action_name.to_sym
|
||||||
.admin-preferences
|
- contr = controller_name.to_sym
|
||||||
%ul
|
|
||||||
- if can? :edit, @project
|
%aside
|
||||||
%li{:class => (act == :edit && contr == :projects) ? 'active' : ''}
|
.admin-preferences
|
||||||
= link_to t("layout.projects.edit"), edit_project_path(@project)
|
%ul
|
||||||
- if can? :manage_collaborators, @project
|
- if can? :edit, @project
|
||||||
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
|
%li{:class => (act == :edit && contr == :projects) ? 'active' : ''}
|
||||||
= link_to t("layout.projects.sections"), sections_project_path(@project)
|
= link_to t("layout.projects.edit"), edit_project_path(@project)
|
||||||
- if can? :manage_collaborators, @project
|
- if can? :manage_collaborators, @project
|
||||||
%li{:class => (act == :edit && contr == :collaborators) ? 'active' : ''}
|
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
|
||||||
= link_to t("layout.projects.edit_collaborators"), edit_project_collaborators_path(@project)
|
= 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
|
-#.block.notice
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
= render :partial => 'projects/submenu'
|
= render :partial => 'projects/submenu'
|
||||||
|
= render :partial => 'projects/sidebar'
|
||||||
|
|
||||||
= form_for @project, :html => { :class => :form, :multipart => true } do |f|
|
= form_for @project, :html => { :class => :form, :multipart => true } do |f|
|
||||||
= render :partial => "form", :locals => {:f => 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
|
= link_to t("layout.delete"), project_path(@project), :method => :delete, :confirm => t("layout.projects.confirm_delete"), :class => 'button' if can? :destroy, @project
|
||||||
.both
|
.both
|
||||||
|
|
||||||
- content_for :sidebar, render('sidebar')
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
= render :partial => 'projects/submenu'
|
= 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|
|
= form_for @project, :url => sections_project_path(@project), :method => :post, :html => { :class => :form, :multipart => true } do |f|
|
||||||
.leftside.w25
|
.leftside.w25
|
||||||
|
@ -23,8 +24,6 @@
|
||||||
= submit_tag t("layout.save"), :class => 'button'
|
= submit_tag t("layout.save"), :class => 'button'
|
||||||
.both
|
.both
|
||||||
|
|
||||||
- content_for :sidebar, render('sidebar')
|
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
// TODO: Replace this temporary hack by something more true
|
// TODO: Replace this temporary hack by something more true
|
||||||
$('.right').addClass('bigpadding');
|
$('.right').addClass('bigpadding');
|
||||||
|
|
Loading…
Reference in New Issue