Skip to content

Commit

Permalink
Merge pull request #3970 from himdel/v2v-layout
Browse files Browse the repository at this point in the history
Add a new "full_center" layout
  • Loading branch information
martinpovolny authored May 22, 2018
2 parents 32aad2e + 8476d59 commit 8d884ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,6 @@ def remote_function(options)
super(options).to_str
end

attr_reader :big_iframe

def appliance_name
MiqServer.my_server.name
end
Expand Down
7 changes: 7 additions & 0 deletions app/helpers/application_helper/page_layouts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,11 @@ def show_adv_search?
(@lastaction == "show_list" && !session[:menu_click] && show_search.include?(@layout) && !@in_a_form) ||
(@explorer && x_tree && tree_with_advanced_search? && !@record)
end

attr_reader :big_iframe

# a layout which gives full control over the center, but always provides the navbars and menus - to be overriden per-controller, used by v2v
def layout_full_center
nil
end
end
3 changes: 3 additions & 0 deletions app/views/layouts/_content.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
= render :partial => "layouts/listnav"
= yield :left
#custom_left_cell
- elsif layout_full_center
= render :partial => "layouts/vertical_navbar"
= render :partial => layout_full_center
- else
#center_div{:style => "height: 100%;"}
= render :partial => center_div_partial
Expand Down

0 comments on commit 8d884ce

Please sign in to comment.