diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index db9dee7..9e1aab4 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -5,7 +5,7 @@ module BoxesHelper content + display_boxes_editor(@controller.boxes_holder) else maybe_display_custom_element(@controller.boxes_holder, :custom_header_expanded, :id => 'profile-header') + - if @controller.send(:uses_design_blocks?) + if @controller.send(:uses_design_blocks?) and @controller.boxes_holder.boxes_limit > 0 display_boxes(@controller.boxes_holder, content) else content_tag('div', diff --git a/lib/acts_as_having_boxes.rb b/lib/acts_as_having_boxes.rb index 95330e6..a6a3c06 100644 --- a/lib/acts_as_having_boxes.rb +++ b/lib/acts_as_having_boxes.rb @@ -29,7 +29,7 @@ module ActsAsHavingBoxes # returns 3 unless the class table has a boxes_limit column. In that case # return the value of the column. def boxes_limit - LayoutTemplate.find(layout_template).number_of_boxes || 3 + @boxes_limit ||= LayoutTemplate.find(layout_template).number_of_boxes || 3 end end diff --git a/public/designs/templates/nobars/config.yml b/public/designs/templates/nobars/config.yml new file mode 100644 index 0000000..b29804f --- /dev/null +++ b/public/designs/templates/nobars/config.yml @@ -0,0 +1,3 @@ +title: "No sidebars, only content" +description: "A template without bars, only content" +number_of_boxes: 0 diff --git a/public/designs/templates/nobars/stylesheets/style.css b/public/designs/templates/nobars/stylesheets/style.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/designs/templates/nobars/stylesheets/style.css diff --git a/public/designs/templates/nobars/thumbnail.png b/public/designs/templates/nobars/thumbnail.png new file mode 100644 index 0000000..2ce3219 Binary files /dev/null and b/public/designs/templates/nobars/thumbnail.png differ diff --git a/public/designs/templates/nobars/thumbnail.svg b/public/designs/templates/nobars/thumbnail.svg new file mode 100644 index 0000000..4f03679 --- /dev/null +++ b/public/designs/templates/nobars/thumbnail.svg @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + -- libgit2 0.21.2