Commit 651b2a36eb4f0b15c1aed2492257de2293e4fb04
Exists in
master
and in
29 other branches
Merge commit 'refs/merge-requests/321' of git://gitorious.org/noosfero/noosfero …
…into merge-requests/321
Showing
6 changed files
with
177 additions
and
2 deletions
Show diff stats
app/helpers/boxes_helper.rb
| ... | ... | @@ -5,7 +5,7 @@ module BoxesHelper |
| 5 | 5 | content + display_boxes_editor(@controller.boxes_holder) |
| 6 | 6 | else |
| 7 | 7 | maybe_display_custom_element(@controller.boxes_holder, :custom_header_expanded, :id => 'profile-header') + |
| 8 | - if @controller.send(:uses_design_blocks?) | |
| 8 | + if @controller.send(:uses_design_blocks?) and @controller.boxes_holder.boxes_limit > 0 | |
| 9 | 9 | display_boxes(@controller.boxes_holder, content) |
| 10 | 10 | else |
| 11 | 11 | content_tag('div', | ... | ... |
lib/acts_as_having_boxes.rb
| ... | ... | @@ -29,7 +29,7 @@ module ActsAsHavingBoxes |
| 29 | 29 | # returns 3 unless the class table has a boxes_limit column. In that case |
| 30 | 30 | # return the value of the column. |
| 31 | 31 | def boxes_limit |
| 32 | - LayoutTemplate.find(layout_template).number_of_boxes || 3 | |
| 32 | + @boxes_limit ||= LayoutTemplate.find(layout_template).number_of_boxes || 3 | |
| 33 | 33 | end |
| 34 | 34 | |
| 35 | 35 | end | ... | ... |
1.12 KB
| ... | ... | @@ -0,0 +1,172 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| 2 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
| 3 | + | |
| 4 | +<svg | |
| 5 | + xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| 6 | + xmlns:cc="http://creativecommons.org/ns#" | |
| 7 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| 8 | + xmlns:svg="http://www.w3.org/2000/svg" | |
| 9 | + xmlns="http://www.w3.org/2000/svg" | |
| 10 | + xmlns:xlink="http://www.w3.org/1999/xlink" | |
| 11 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |
| 12 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
| 13 | + width="64px" | |
| 14 | + height="64px" | |
| 15 | + id="svg2383" | |
| 16 | + sodipodi:version="0.32" | |
| 17 | + inkscape:version="0.48.2 r9819" | |
| 18 | + sodipodi:docname="thumbnail.svg" | |
| 19 | + inkscape:output_extension="org.inkscape.output.svg.inkscape" | |
| 20 | + inkscape:export-filename="thumbnail.png" | |
| 21 | + inkscape:export-xdpi="95.625" | |
| 22 | + inkscape:export-ydpi="95.625" | |
| 23 | + version="1.1"> | |
| 24 | + <defs | |
| 25 | + id="defs2385"> | |
| 26 | + <linearGradient | |
| 27 | + id="linearGradient3263"> | |
| 28 | + <stop | |
| 29 | + id="stop3265" | |
| 30 | + offset="0" | |
| 31 | + style="stop-color:#204a87;stop-opacity:1" /> | |
| 32 | + <stop | |
| 33 | + id="stop3267" | |
| 34 | + offset="1" | |
| 35 | + style="stop-color:#729fcf;stop-opacity:1" /> | |
| 36 | + </linearGradient> | |
| 37 | + <linearGradient | |
| 38 | + id="linearGradient3257" | |
| 39 | + inkscape:collect="always"> | |
| 40 | + <stop | |
| 41 | + id="stop3259" | |
| 42 | + offset="0" | |
| 43 | + style="stop-color:#204a87;stop-opacity:1" /> | |
| 44 | + <stop | |
| 45 | + id="stop3261" | |
| 46 | + offset="1" | |
| 47 | + style="stop-color:#729fcf;stop-opacity:1" /> | |
| 48 | + </linearGradient> | |
| 49 | + <linearGradient | |
| 50 | + inkscape:collect="always" | |
| 51 | + id="linearGradient3245"> | |
| 52 | + <stop | |
| 53 | + style="stop-color:#204a87;stop-opacity:1" | |
| 54 | + offset="0" | |
| 55 | + id="stop3247" /> | |
| 56 | + <stop | |
| 57 | + style="stop-color:#729fcf;stop-opacity:1" | |
| 58 | + offset="1" | |
| 59 | + id="stop3249" /> | |
| 60 | + </linearGradient> | |
| 61 | + <inkscape:perspective | |
| 62 | + sodipodi:type="inkscape:persp3d" | |
| 63 | + inkscape:vp_x="0 : 32 : 1" | |
| 64 | + inkscape:vp_y="0 : 1000 : 0" | |
| 65 | + inkscape:vp_z="64 : 32 : 1" | |
| 66 | + inkscape:persp3d-origin="32 : 21.333333 : 1" | |
| 67 | + id="perspective2391" /> | |
| 68 | + <filter | |
| 69 | + inkscape:collect="always" | |
| 70 | + id="filter3241"> | |
| 71 | + <feGaussianBlur | |
| 72 | + inkscape:collect="always" | |
| 73 | + stdDeviation="0.9075" | |
| 74 | + id="feGaussianBlur3243" /> | |
| 75 | + </filter> | |
| 76 | + <linearGradient | |
| 77 | + inkscape:collect="always" | |
| 78 | + xlink:href="#linearGradient3245" | |
| 79 | + id="linearGradient3251" | |
| 80 | + x1="11.5" | |
| 81 | + y1="60.5" | |
| 82 | + x2="3.5" | |
| 83 | + y2="3.5" | |
| 84 | + gradientUnits="userSpaceOnUse" /> | |
| 85 | + <linearGradient | |
| 86 | + inkscape:collect="always" | |
| 87 | + xlink:href="#linearGradient3263" | |
| 88 | + id="linearGradient3253" | |
| 89 | + x1="42.5" | |
| 90 | + y1="60.5" | |
| 91 | + x2="19.5" | |
| 92 | + y2="3.5" | |
| 93 | + gradientUnits="userSpaceOnUse" /> | |
| 94 | + <linearGradient | |
| 95 | + inkscape:collect="always" | |
| 96 | + xlink:href="#linearGradient3257" | |
| 97 | + id="linearGradient3255" | |
| 98 | + x1="60.5" | |
| 99 | + y1="60.5" | |
| 100 | + x2="51.5" | |
| 101 | + y2="3.5" | |
| 102 | + gradientUnits="userSpaceOnUse" /> | |
| 103 | + </defs> | |
| 104 | + <sodipodi:namedview | |
| 105 | + id="base" | |
| 106 | + pagecolor="#ffffff" | |
| 107 | + bordercolor="#666666" | |
| 108 | + borderopacity="1.0" | |
| 109 | + inkscape:pageopacity="0.0" | |
| 110 | + inkscape:pageshadow="2" | |
| 111 | + inkscape:zoom="7.1705047" | |
| 112 | + inkscape:cx="49.216988" | |
| 113 | + inkscape:cy="30.950918" | |
| 114 | + inkscape:current-layer="layer1" | |
| 115 | + showgrid="true" | |
| 116 | + inkscape:document-units="px" | |
| 117 | + inkscape:grid-bbox="true" | |
| 118 | + inkscape:window-width="1360" | |
| 119 | + inkscape:window-height="714" | |
| 120 | + inkscape:window-x="0" | |
| 121 | + inkscape:window-y="0" | |
| 122 | + objecttolerance="10" | |
| 123 | + gridtolerance="10" | |
| 124 | + guidetolerance="10" | |
| 125 | + inkscape:window-maximized="0"> | |
| 126 | + <inkscape:grid | |
| 127 | + type="xygrid" | |
| 128 | + id="grid2382" | |
| 129 | + visible="true" | |
| 130 | + enabled="true" | |
| 131 | + originx="0.5px" | |
| 132 | + originy="0.5px" | |
| 133 | + empcolor="#0000ff" | |
| 134 | + empopacity="0.1254902" | |
| 135 | + dotted="true" /> | |
| 136 | + </sodipodi:namedview> | |
| 137 | + <metadata | |
| 138 | + id="metadata2388"> | |
| 139 | + <rdf:RDF> | |
| 140 | + <cc:Work | |
| 141 | + rdf:about=""> | |
| 142 | + <dc:format>image/svg+xml</dc:format> | |
| 143 | + <dc:type | |
| 144 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
| 145 | + <dc:title></dc:title> | |
| 146 | + </cc:Work> | |
| 147 | + </rdf:RDF> | |
| 148 | + </metadata> | |
| 149 | + <g | |
| 150 | + id="layer1" | |
| 151 | + inkscape:label="Layer 1" | |
| 152 | + inkscape:groupmode="layer"> | |
| 153 | + <rect | |
| 154 | + y="1.5" | |
| 155 | + x="15.5" | |
| 156 | + height="59" | |
| 157 | + width="31" | |
| 158 | + id="rect3156" | |
| 159 | + style="opacity:1;fill:url(#linearGradient3253);fill-opacity:1;fill-rule:nonzero;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | |
| 160 | + ry="2" /> | |
| 161 | + <rect | |
| 162 | + y="2.5" | |
| 163 | + x="16.5" | |
| 164 | + height="57" | |
| 165 | + width="29" | |
| 166 | + id="rect3162" | |
| 167 | + style="opacity:0.6;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | |
| 168 | + ry="1" | |
| 169 | + inkscape:export-xdpi="90" | |
| 170 | + inkscape:export-ydpi="90" /> | |
| 171 | + </g> | |
| 172 | +</svg> | ... | ... |