Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup taxa/add_edit view

  • Loading branch information...
commit 1154404833992b07132b622ed678b588f2a22d82 1 parent 7897fad
@khustochka authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 app/views/taxa/add_edit.html.haml
View
9 app/views/taxa/add_edit.html.haml
@@ -1,10 +1,13 @@
+- @page_header = capture do
+ = @taxon.new_record? ? "#{action_name.humanize} #{model_name}" : "#{@taxon.name.if_present {|s2| "#{s2} / "}}#{content_tag :em, @taxon.name_la}"
+
- content_for :page_title do
- = @taxon.name_la.if_present! {|s| "#{model_name.capitalize} #{s}"} rescue "#{action_name.humanize} #{model_name}"
+ = strip_tags @page_header
%h1
- = @taxon.name_la.if_present! {|s| "#{@taxon.name.if_present {|s2| "#{s2} / "}}#{content_tag :em, s}"} rescue "#{action_name.humanize} #{model_name}"
+ = @page_header
-= render( :partial => "taxa/table" )
+= render( :partial => "taxa/table" ) unless @taxon.bottom_level? || @taxon.new_record?
%h2
Редактировать
Please sign in to comment.
Something went wrong with that request. Please try again.