diff options
| author | Xinhui | 2017-10-19 14:53:33 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-10-19 14:53:33 +0200 | 
| commit | d304de7288b6d8111b1d9abc2f52be344e829166 (patch) | |
| tree | 3a39db092b0d64ea3356ec0e6a86e714bfee1e77 | |
| parent | 1d9274f1aef2149b93cf4ae9a74e1d2badeb60e1 (diff) | |
| download | chouette-core-d304de7288b6d8111b1d9abc2f52be344e829166.tar.bz2 | |
Breadcrumb for organisation
| -rw-r--r-- | app/views/organisations/edit.html.slim | 3 | ||||
| -rw-r--r-- | app/views/organisations/show.html.slim | 2 | ||||
| -rw-r--r-- | config/breadcrumbs.rb | 6 | 
3 files changed, 10 insertions, 1 deletions
| diff --git a/app/views/organisations/edit.html.slim b/app/views/organisations/edit.html.slim index a78d59f3d..0d81b26e3 100644 --- a/app/views/organisations/edit.html.slim +++ b/app/views/organisations/edit.html.slim @@ -1,3 +1,4 @@ +- breadcrumb :organisation, @organisation  = title_tag t('.title')  = semantic_form_for @organisation, :url => organisation_path do |form| @@ -7,4 +8,4 @@    = form.actions do      = form.action :submit, as: :button -    = form.action :cancel, as: :link
\ No newline at end of file +    = form.action :cancel, as: :link diff --git a/app/views/organisations/show.html.slim b/app/views/organisations/show.html.slim index bf9f464dd..89e3b2870 100644 --- a/app/views/organisations/show.html.slim +++ b/app/views/organisations/show.html.slim @@ -1,3 +1,5 @@ +- breadcrumb :organisation, @organisation +  = title_tag @organisation.name  .summary diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb index cbfdf9de7..3e279a84b 100644 --- a/config/breadcrumbs.rb +++ b/config/breadcrumbs.rb @@ -40,6 +40,12 @@ crumb :import do |workbench, import|    link import.name, workbench_import_path(workbench, import)    parent :imports, workbench  end + +crumb :organisation do |organisation| +  link organisation.name, organisation_path(organisation) +end + +  # crumb :project do |project|  #   link project.name, project_path(project)  #   parent :projects | 
