[noosfero/noosfero][master] 9 commits: Fix Top and Left Bar bug, the Top Bar was in below

Rodrigo Souto gitlab at gitlab.com
Tue May 12 13:17:43 BRT 2015


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
f013c65a by Luciano Prestes Cavacanti at 2015-05-12T13:15:35Z
Fix Top and Left Bar bug, the Top Bar was in below

Signed-off-by: Luciano Prestes <lucianopcbr at gmail.com>

- - - - -
f82f1955 by Luciano Prestes Cavacanti at 2015-05-12T13:15:35Z
Add new layout template with 4 boxes

Signed-off-by: Arthur Del Esposte <arthurmde at gmail.com>
Signed-off-by: Fabio Teixeira <fabio1079 at gmail.com>
Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr at gmail.com>

- - - - -
d82b1b03 by Fabio Teixeira at 2015-05-12T13:15:35Z
Change blocks position

Signed-off-by: Fabio Teixeira <fabio1079 at gmail.com>

- - - - -
cd1a5cd2 by Fabio Teixeira at 2015-05-12T13:15:35Z
Allow noosfero template system to use javascript

Signed-off-by: Fabio Teixeira <fabio1079 at gmail.com>

- - - - -
a942a1e4 by Fabio Teixeira at 2015-05-12T13:15:35Z
Make box-2 stay align with box-4

Signed-off-by: Fabio Teixeira <fabio1079 at gmail.com>
Signed-off-by: Thiago Ribeiro <thiagitosouza at hotmail.com>

- - - - -
49914a4d by Fabio Teixeira at 2015-05-12T13:15:35Z
Remove unnecessary CSS

Signed-off-by: Fabio Teixeira <fabio1079 at gmail.com>
Signed-off-by: Thiago Ribeiro <thiagitosouza at hotmail.com>

- - - - -
59c6019c by Thiago Ribeiro at 2015-05-12T13:15:35Z
Migrate for add the fourth box.

Migrate for add the fourth box to existing enviroments and profiles.

Signed-off-by: Thiago Ribeiro <thiagitosouza at hotmail.com>

- - - - -
9132007f by André Bernardes at 2015-05-12T13:15:35Z
Applying merge request revisions

Signed-off-by: André Bernardes <andrebsguedes at gmail.com>
Signed-off-by: Thiago Ribeiro <thiagitosouza at hotmail.com>

- - - - -
8e2f02dc by Rodrigo Souto at 2015-05-12T13:17:02Z
noosfero-steps: fix box fetch on block creation

- - - - -


17 changed files:

- app/helpers/application_helper.rb
- app/helpers/layout_helper.rb
- app/models/environment.rb
- app/models/profile.rb
- + db/migrate/20150423144533_add_new_box_to_every_environment_and_profile.rb
- + features/change_appearance.feature
- features/step_definitions/noosfero_steps.rb
- + public/designs/templates/lefttopright/config.yml
- + public/designs/templates/lefttopright/javascripts/template.js
- + public/designs/templates/lefttopright/stylesheets/style.css
- + public/designs/templates/lefttopright/thumbnail.png
- + public/designs/templates/lefttopright/thumbnail.svg
- public/designs/templates/topleft/stylesheets/style.css
- + public/images/blocks/4.png
- + public/images/blocks/4.svg
- public/stylesheets/application.css
- test/unit/enterprise_test.rb


Changes:

=====================================
app/helpers/application_helper.rb
=====================================
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -707,6 +707,24 @@ module ApplicationHelper
     javascript_include_tag script if script
   end
 
+  def template_path
+    if profile.nil?
+      "/designs/templates/#{environment.layout_template}"
+    else
+      "/designs/templates/#{profile.layout_template}"
+    end
+  end
+
+  def template_javascript_src
+    script = File.join template_path, '/javascripts/template.js'
+    script if File.exists? File.join(Rails.root, 'public', script)
+  end
+
+  def templete_javascript_ng
+    script = template_javascript_src
+    javascript_include_tag script if script
+  end
+
   def file_field_or_thumbnail(label, image, i)
     display_form_field label, (
       render :partial => (image && image.valid? ? 'shared/show_thumbnail' : 'shared/change_image'),


=====================================
app/helpers/layout_helper.rb
=====================================
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -38,6 +38,8 @@ module LayoutHelper
     output += theme_javascript_ng.to_s
     output += javascript_tag 'render_all_jquery_ui_widgets()'
 
+    output += templete_javascript_ng.to_s
+
     output
   end
 
@@ -70,11 +72,7 @@ module LayoutHelper
   end
 
   def template_stylesheet_path
-    if profile.nil?
-      "/designs/templates/#{environment.layout_template}/stylesheets/style.css"
-    else
-      "/designs/templates/#{profile.layout_template}/stylesheets/style.css"
-    end
+    File.join template_path, "/stylesheets/style.css"
   end
 
 


=====================================
app/models/environment.rb
=====================================
--- a/app/models/environment.rb
+++ b/app/models/environment.rb
@@ -19,6 +19,8 @@ class Environment < ActiveRecord::Base
     filename
   end
 
+  NUMBER_OF_BOXES = 4
+
   PERMISSIONS['Environment'] = {
     'view_environment_admin_panel' => N_('View environment admin panel'),
     'edit_environment_features' => N_('Edit environment features'),
@@ -172,7 +174,7 @@ class Environment < ActiveRecord::Base
   acts_as_having_boxes
 
   after_create do |env|
-    3.times do
+    NUMBER_OF_BOXES.times do
       env.boxes << Box.new
     end
 
@@ -737,8 +739,8 @@ class Environment < ActiveRecord::Base
   end
 
   def is_default_template?(template)
-    is_default = template == community_default_template 
-    is_default = is_default || template == person_default_template 
+    is_default = template == community_default_template
+    is_default = is_default || template == person_default_template
     is_default = is_default || template == enterprise_default_template
     is_default
   end


=====================================
app/models/profile.rb
=====================================
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -22,6 +22,8 @@ class Profile < ActiveRecord::Base
     :display => %w[compact]
   }
 
+  NUMBER_OF_BOXES = 4
+
   def self.default_search_display
     'compact'
   end
@@ -362,7 +364,7 @@ class Profile < ActiveRecord::Base
     if template
       apply_template(template, :copy_articles => false)
     else
-      3.times do
+      NUMBER_OF_BOXES.times do
         self.boxes << Box.new
       end
 


=====================================
db/migrate/20150423144533_add_new_box_to_every_environment_and_profile.rb
=====================================
--- /dev/null
+++ b/db/migrate/20150423144533_add_new_box_to_every_environment_and_profile.rb
@@ -0,0 +1,15 @@
+class AddNewBoxToEveryEnvironmentAndProfile < ActiveRecord::Migration
+    def up
+      Environment.find_each do |env|
+        env.boxes << Box.new if env.boxes.count < 4
+      end
+
+      Profile.find_each do |profile|
+        profile.boxes << Box.new if profile.boxes.count < 4
+      end
+    end
+
+    def down
+      say "this migration can't be reverted"
+    end
+end


=====================================
features/change_appearance.feature
=====================================
--- /dev/null
+++ b/features/change_appearance.feature
@@ -0,0 +1,20 @@
+Feature: Change appearance
+  As a user
+  I want to change the appearance of my profile page
+
+  Background:
+    Given the following users
+      | login     | name       |
+      | joaosilva | Joao Silva |
+
+  Scenario: Change appearance from default(3 boxes) to Left Top and Right(4 boxes)
+    Given I am logged in as "joaosilva"
+    And I go to joaosilva's control panel
+    And I follow "Edit sideboxes"
+    And I should not see an element ".box-4"
+    And I go to joaosilva's control panel
+    And I follow "Edit Appearance"
+    And I follow "Left Top and Right"
+    And I go to joaosilva's control panel
+    And I follow "Edit sideboxes"
+    And I should see an element ".box-4"


=====================================
features/step_definitions/noosfero_steps.rb
=====================================
--- a/features/step_definitions/noosfero_steps.rb
+++ b/features/step_definitions/noosfero_steps.rb
@@ -94,8 +94,8 @@ Given /^the following blocks$/ do |table|
       owner.boxes<< Box.new
       owner.boxes.first.blocks << MainBlock.new
     end
-    box_id = owner.boxes.last.id
-    klass.constantize.create!(item.merge(:box_id => box_id))
+    box = owner.boxes.where(:position => 3).first
+    klass.constantize.create!(item.merge(:box => box))
   end
 end
 


=====================================
public/designs/templates/lefttopright/config.yml
=====================================
--- /dev/null
+++ b/public/designs/templates/lefttopright/config.yml
@@ -0,0 +1,4 @@
+name: "Top and Side Bars"
+title: "1 max colum at left, 1 min colum at right, 1 top line"
+description: "A template with 1 colum in left, 1 colum in right and 1 line in top"
+number_of_boxes: 4


=====================================
public/designs/templates/lefttopright/javascripts/template.js
=====================================
--- /dev/null
+++ b/public/designs/templates/lefttopright/javascripts/template.js
@@ -0,0 +1,6 @@
+$(document).ready(function() {
+  var box_4_height = $(".box-4").height();
+
+  // Make box-2(the most left one) stay align with box-4
+  $(".box-2").css("margin-top", "-"+box_4_height+"px");
+});


=====================================
public/designs/templates/lefttopright/stylesheets/style.css
=====================================
--- /dev/null
+++ b/public/designs/templates/lefttopright/stylesheets/style.css
@@ -0,0 +1,42 @@
+#boxes {
+  display: table;
+  width: 100%;
+}
+
+.box-1 {
+  width: 58%;
+  float: left;
+  margin: 1% 1% 0% 1%;
+}
+
+
+.box-2 {
+  position: relative;
+  float: left;
+  width: 20%;
+}
+
+.box-3 {
+  position: relative;
+  float: right;
+  width: 20%;
+  margin-top: 1%;
+}
+
+.box-4 {
+  float: left;
+  width: 79%;
+  margin-left: 21%;
+}
+
+#profile-activity ul,
+#profile-network ul,
+#profile-wall ul {
+  width: 460px;
+}
+#profile-activity ul.comment-replies,
+#profile-network ul.comment-replies,
+#profile-wall ul.comment-replies {
+  width: auto;
+}
+


=====================================
public/designs/templates/lefttopright/thumbnail.png
=====================================
Binary files /dev/null and b/public/designs/templates/lefttopright/thumbnail.png differ


=====================================
public/designs/templates/lefttopright/thumbnail.svg
=====================================
--- /dev/null
+++ b/public/designs/templates/lefttopright/thumbnail.svg
@@ -0,0 +1,434 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg2383"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="thumbnail.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="thumbnail.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   version="1.1">
+  <defs
+     id="defs2385">
+    <linearGradient
+       id="linearGradient3263">
+      <stop
+         id="stop3265"
+         offset="0"
+         style="stop-color:#204a87;stop-opacity:1" />
+      <stop
+         id="stop3267"
+         offset="1"
+         style="stop-color:#729fcf;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3257"
+       inkscape:collect="always">
+      <stop
+         id="stop3259"
+         offset="0"
+         style="stop-color:#204a87;stop-opacity:1" />
+      <stop
+         id="stop3261"
+         offset="1"
+         style="stop-color:#729fcf;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3245">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1"
+         offset="0"
+         id="stop3247" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop3249" />
+    </linearGradient>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 32 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="64 : 32 : 1"
+       inkscape:persp3d-origin="32 : 21.333333 : 1"
+       id="perspective2391" />
+    <filter
+       inkscape:collect="always"
+       id="filter3241">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.9075"
+         id="feGaussianBlur3243" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245"
+       id="linearGradient3251"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(2,0)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3263"
+       id="linearGradient3253"
+       x1="49.5"
+       y1="60.5"
+       x2="23.5"
+       y2="3.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(2,0)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3257"
+       id="linearGradient3255"
+       x1="60.5"
+       y1="60.5"
+       x2="51.5"
+       y2="3.5"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter3241-2">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.9075"
+         id="feGaussianBlur3243-4" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-1"
+       id="linearGradient3251-0"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(249.71429,298.93361)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3245-1">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1"
+         offset="0"
+         id="stop3247-6" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop3249-5" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter3241-4-8">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.9075"
+         id="feGaussianBlur3243-0-7" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3263-5-8"
+       id="linearGradient5185"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.4160224,0,0,0.76166072,243.22589,313.33388)"
+       x1="42.5"
+       y1="60.5"
+       x2="19.5"
+       y2="3.5" />
+    <linearGradient
+       id="linearGradient3263-5-8">
+      <stop
+         id="stop3265-4-3"
+         offset="0"
+         style="stop-color:#204a87;stop-opacity:1" />
+      <stop
+         id="stop3267-2-4"
+         offset="1"
+         style="stop-color:#729fcf;stop-opacity:1" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter3241-0">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.9075"
+         id="feGaussianBlur3243-3" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-7"
+       id="linearGradient5168"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0025263,0,0,0.76423683,344.68831,300.13218)"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3245-7">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1"
+         offset="0"
+         id="stop3247-0" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop3249-7" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-70"
+       id="linearGradient3251-55"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0025263,0,0,0.76423683,344.68831,300.13218)" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3245-70">
+      <stop
+         style="stop-color:#204a87;stop-opacity:1"
+         offset="0"
+         id="stop3247-2" />
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1"
+         offset="1"
+         id="stop3249-87" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-1"
+       id="linearGradient5832"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(249.71429,298.93361)"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3263-5-8"
+       id="linearGradient5834"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.4160224,0,0,0.76166072,243.22589,313.33388)"
+       x1="42.5"
+       y1="60.5"
+       x2="19.5"
+       y2="3.5" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-7"
+       id="linearGradient5836"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0025263,0,0,0.76423683,344.68831,300.13218)"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3245-70"
+       id="linearGradient5838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0025263,0,0,0.76423683,344.68831,300.13218)"
+       x1="11.5"
+       y1="60.5"
+       x2="3.5"
+       y2="3.5" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.5351563"
+     inkscape:cx="-16.066434"
+     inkscape:cy="0.12147739"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     inkscape:window-width="1364"
+     inkscape:window-height="678"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2382"
+       visible="true"
+       enabled="true"
+       originx="0.5px"
+       originy="0.5px"
+       empcolor="#0000ff"
+       empopacity="0.1254902"
+       dotted="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata2388">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       transform="translate(-247.62879,-298.93361)"
+       id="g5187">
+      <g
+         id="g4846">
+        <g
+           id="g3190-2"
+           style="opacity:0.4;filter:url(#filter3241-2)"
+           transform="translate(250.71429,299.93361)">
+          <rect
+             y="1.5"
+             x="1.5"
+             height="59"
+             width="11"
+             id="rect3184-1"
+             style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+             ry="2"
+             rx="2" />
+        </g>
+        <rect
+           y="300.43362"
+           x="251.21428"
+           height="59"
+           width="11"
+           id="rect2395-8"
+           style="fill:url(#linearGradient5832);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           ry="2"
+           rx="2" />
+        <rect
+           ry="1"
+           style="opacity:0.6;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3158-7"
+           width="9"
+           height="57"
+           x="252.21428"
+           y="301.43362"
+           rx="1" />
+      </g>
+      <g
+         transform="matrix(0.69260722,0,0,1,81.51265,0)"
+         id="g5180">
+        <rect
+           rx="2"
+           ry="2"
+           style="opacity:0.4;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3241-4-8);enable-background:accumulate"
+           id="rect3188-8"
+           width="31"
+           height="59"
+           x="16.5"
+           y="2.5"
+           transform="matrix(1.4160224,0,0,0.76166071,243.80989,314.09132)" />
+        <rect
+           y="314.47638"
+           x="265.17426"
+           height="44.937984"
+           width="43.896694"
+           id="rect3156-3"
+           style="fill:url(#linearGradient5834);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1.03852236;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           ry="1.5233214" />
+        <rect
+           y="315.23804"
+           x="266.59027"
+           height="43.414661"
+           width="41.064651"
+           id="rect3162-1"
+           style="opacity:0.6;fill:none;stroke:#ffffff;stroke-width:1.03852236;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           ry="0.7616607"
+           inkscape:export-xdpi="90"
+           inkscape:export-ydpi="90" />
+      </g>
+      <g
+         transform="matrix(0.9761091,0,0,1,6.3333026,0)"
+         id="g5108">
+        <rect
+           rx="2"
+           ry="2"
+           style="opacity:0.4;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3241-0);enable-background:accumulate"
+           id="rect3184-5"
+           width="11"
+           height="59"
+           x="2.5"
+           y="2.5"
+           transform="matrix(0,1.0025263,-0.76423683,0,312.09322,298.92289)" />
+        <g
+           transform="matrix(0,1,-1,0,611.46116,-45.820829)"
+           id="g4877-9">
+          <rect
+             ry="1.5284736"
+             style="fill:url(#linearGradient5836);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:0.87531;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+             id="rect2395-95"
+             width="11.02779"
+             height="45.089973"
+             x="346.19211"
+             y="301.27853" />
+          <rect
+             y="302.04276"
+             x="347.19461"
+             height="43.561501"
+             width="9.0227375"
+             id="rect3158-2"
+             style="opacity:0.6;fill:none;stroke:#ffffff;stroke-width:0.87531;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+             ry="0.76423681" />
+        </g>
+      </g>
+      <g
+         id="g4877-8"
+         transform="translate(-47.956003,13.002947)">
+        <rect
+           y="301.27853"
+           x="346.19211"
+           height="45.089973"
+           width="11.02779"
+           id="rect2395-1"
+           style="fill:url(#linearGradient5838);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:0.87531;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           ry="1.5284736" />
+        <rect
+           ry="0.76423681"
+           style="opacity:0.6;fill:none;stroke:#ffffff;stroke-width:0.87531;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           id="rect3158-71"
+           width="9.0227375"
+           height="43.561501"
+           x="347.19461"
+           y="302.04276" />
+      </g>
+    </g>
+  </g>
+</svg>


=====================================
public/designs/templates/topleft/stylesheets/style.css
=====================================
--- a/public/designs/templates/topleft/stylesheets/style.css
+++ b/public/designs/templates/topleft/stylesheets/style.css
@@ -20,7 +20,7 @@
 
 .box-3 {
   position: relative;
-  display: table-footer-group;
+  display: table-header-group;
   width: 100%;
 }
 


=====================================
public/images/blocks/4.png
=====================================
Binary files /dev/null and b/public/images/blocks/4.png differ


=====================================
public/images/blocks/4.svg
=====================================
--- /dev/null
+++ b/public/images/blocks/4.svg
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64"
+   height="64"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.48.3.1 r9886"
+   version="1.0"
+   sodipodi:docname="4.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/noosfero/sites/noosfero/public/images/blocks/4.png"
+   inkscape:export-xdpi="87.968124"
+   inkscape:export-ydpi="87.968124">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.921875"
+     inkscape:cx="32"
+     inkscape:cy="32"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="64px"
+     height="64px"
+     inkscape:window-width="1366"
+     inkscape:window-height="681"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     showgrid="false"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Camada 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       sodipodi:type="arc"
+       style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:4.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.19607843"
+       id="path2162"
+       sodipodi:cx="24.12665"
+       sodipodi:cy="24.063324"
+       sodipodi:rx="21.593668"
+       sodipodi:ry="21.277044"
+       d="M 45.720318 24.063324 A 21.593668 21.277044 0 1 1  2.5329819,24.063324 A 21.593668 21.277044 0 1 1  45.720318 24.063324 z"
+       transform="translate(7.8733501,7.936676)" />
+    <text
+       xml:space="preserve"
+       style="font-size:42.00993729px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:0.19607843;stroke:none;font-family:FreeSans"
+       x="16.267668"
+       y="47.399117"
+       id="text3134"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3136"
+         x="16.267668"
+         y="47.399117">4</tspan></text>
+  </g>
+</svg>


=====================================
public/stylesheets/application.css
=====================================
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1842,6 +1842,9 @@ a.button.disabled, input.disabled {
 #box-organizer div.box-3 {
   background-image: url(../images/blocks/3.png);
 }
+#box-organizer div.box-4 {
+  background-image: url(../images/blocks/4.png);
+}
 #box-organizer .block {
   cursor: move;
 }


=====================================
test/unit/enterprise_test.rb
=====================================
--- a/test/unit/enterprise_test.rb
+++ b/test/unit/enterprise_test.rb
@@ -188,7 +188,7 @@ class EnterpriseTest < ActiveSupport::TestCase
     inactive_template.save!
 
     active_template = create(Enterprise, :name => 'enteprise template', :identifier => 'enterprise_template')
-    assert_equal 3, active_template.boxes.size
+    assert_equal 4, active_template.boxes.size
 
     e = Environment.default
     e.inactive_enterprise_template = inactive_template
@@ -400,7 +400,7 @@ class EnterpriseTest < ActiveSupport::TestCase
     e.save!
 
     ent = create(Enterprise, :name => 'test enteprise', :identifier => 'test_ent')
-    assert_equal 3, ent.boxes.size
+    assert_equal 4, ent.boxes.size
   end
 
   should 'collect the highlighted products with image' do



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/9a6bf3c266b72fbbd99d82896e3e37529d5db5c2...8e2f02dc74988c3611e17fded12feb452e5da2be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150512/336497ce/attachment-0001.html>


More information about the Noosfero-dev mailing list