Commit 9796d5e31fb63967dce3323ad0a0fde4862bc01b
1 parent
83f37f7a
Exists in
staging
and in
7 other branches
refactoring block store to make images path available for plugins and themes
Showing
23 changed files
with
838 additions
and
17 deletions
Show diff stats
app/helpers/box_organizer_helper.rb
@@ -4,6 +4,34 @@ module BoxOrganizerHelper | @@ -4,6 +4,34 @@ module BoxOrganizerHelper | ||
4 | 7 | 4 | 7 |
5 | end | 5 | end |
6 | 6 | ||
7 | + #FIXME make this test | ||
8 | + def display_icon(block) | ||
9 | + | ||
10 | + image_path = nil | ||
11 | + plugin = @plugins.fetch_first_plugin(:has_block?, block) | ||
12 | + | ||
13 | + theme = Theme.new(environment.theme) # remove this | ||
14 | + if File.exists?(File.join(theme.filesystem_path, 'images', block.icon_path)) | ||
15 | + image_path = File.join(theme.public_path, 'images', block.icon_path) | ||
16 | + elsif plugin && File.exists?(File.join(Rails.root, 'public', plugin.public_path, 'images', block.icon_path)) | ||
17 | + image_path = File.join('/', plugin.public_path, 'images', block.icon_path) | ||
18 | + elsif File.exists?(File.join(Rails.root, 'public', 'images', block.icon_path)) | ||
19 | + image_path = block.icon_path | ||
20 | + else | ||
21 | + image_path = block.default_icon_path | ||
22 | + end | ||
23 | + | ||
24 | + image_tag(image_path, height: '48', width: '48', class: 'block-type-icon', alt: '' ) | ||
25 | + end | ||
26 | + | ||
27 | + def display_previews(block) | ||
28 | +# def self.previews_path | ||
29 | +# previews = Dir.glob(File.join(images_filesystem_path, 'previews/*')).map do |path| | ||
30 | +# File.join(images_base_url_path, 'previews', File.basename(path)) | ||
31 | +# end | ||
32 | + '' | ||
33 | + end | ||
34 | + | ||
7 | def icon_selector(icon = 'no-ico') | 35 | def icon_selector(icon = 'no-ico') |
8 | render :partial => 'icon_selector', :locals => { :icon => icon } | 36 | render :partial => 'icon_selector', :locals => { :icon => icon } |
9 | end | 37 | end |
app/models/block.rb
@@ -116,7 +116,7 @@ class Block < ActiveRecord::Base | @@ -116,7 +116,7 @@ class Block < ActiveRecord::Base | ||
116 | # Must be redefined in subclasses to match the description of each block | 116 | # Must be redefined in subclasses to match the description of each block |
117 | # type. | 117 | # type. |
118 | def self.description | 118 | def self.description |
119 | - '(dummy)' | 119 | + _('nothing') |
120 | end | 120 | end |
121 | 121 | ||
122 | # returns a short description of the block, used when the user sees a list of | 122 | # returns a short description of the block, used when the user sees a list of |
@@ -125,20 +125,32 @@ class Block < ActiveRecord::Base | @@ -125,20 +125,32 @@ class Block < ActiveRecord::Base | ||
125 | # Must be redefined in subclasses to match the short description of each block | 125 | # Must be redefined in subclasses to match the short description of each block |
126 | # type. | 126 | # type. |
127 | def self.short_description | 127 | def self.short_description |
128 | - _('(dummy)') | 128 | + self.pretty_name |
129 | end | 129 | end |
130 | 130 | ||
131 | - def self.default_preview | ||
132 | - "/images/block_preview.png" | 131 | + def self.pretty_name |
132 | + self.name.gsub('Block','') | ||
133 | end | 133 | end |
134 | 134 | ||
135 | - def self.previews | ||
136 | - [] | 135 | + #FIXME make this test |
136 | + def self.default_preview | ||
137 | + "/images/block_preview.png" | ||
137 | end | 138 | end |
138 | 139 | ||
139 | - def self.icon | ||
140 | - "/images/icon_block.png" | ||
141 | - end | 140 | +# #FIXME remove this code |
141 | +# def self.previews_path | ||
142 | +# previews = Dir.glob(File.join(images_filesystem_path, 'previews/*')).map do |path| | ||
143 | +# File.join(images_base_url_path, 'previews', File.basename(path)) | ||
144 | +# end | ||
145 | +# end | ||
146 | + | ||
147 | +# #FIXME remove this code | ||
148 | +# def self.icon_path | ||
149 | +# icon_path = File.join(images_base_url_path, 'icon.png') | ||
150 | +#puts File.join(images_filesystem_path, 'icon.png').inspect | ||
151 | +##"/plugins/container_block/images/handle_e.png" | ||
152 | +# File.exists?(File.join(images_filesystem_path, 'icon.png')) ? icon_path : default_icon_path | ||
153 | +# end | ||
142 | 154 | ||
143 | # Returns the content to be used for this block. | 155 | # Returns the content to be used for this block. |
144 | # | 156 | # |
@@ -255,4 +267,21 @@ class Block < ActiveRecord::Base | @@ -255,4 +267,21 @@ class Block < ActiveRecord::Base | ||
255 | duplicated_block | 267 | duplicated_block |
256 | end | 268 | end |
257 | 269 | ||
270 | + #FIXME make this test | ||
271 | + def self.previews_path | ||
272 | + base_name = self.name.split('::').last.underscore | ||
273 | + Dir.glob(File.join('blocks', base_name,'previews/*')) | ||
274 | + end | ||
275 | + | ||
276 | + #FIXME make this test | ||
277 | + def self.icon_path | ||
278 | + basename = self.name.split('::').last.underscore | ||
279 | + File.join('blocks', basename, 'icon.png') | ||
280 | + end | ||
281 | + | ||
282 | + #FIXME make this test | ||
283 | + def self.default_icon_path | ||
284 | + 'icon_block.png' | ||
285 | + end | ||
286 | + | ||
258 | end | 287 | end |
app/models/communities_block.rb
@@ -3,9 +3,18 @@ class CommunitiesBlock < ProfileListBlock | @@ -3,9 +3,18 @@ class CommunitiesBlock < ProfileListBlock | ||
3 | attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type | 3 | attr_accessible :accessor_id, :accessor_type, :role_id, :resource_id, :resource_type |
4 | 4 | ||
5 | def self.description | 5 | def self.description |
6 | + _("<p>Display all of your communities.</p><p>You could choose the amount of communities will be displayed and you could priorize that profiles with images.</p> <p>The view all button is always present in the block.</p>") | ||
7 | + end | ||
8 | + | ||
9 | + | ||
10 | + def self.short_description | ||
6 | _('Communities') | 11 | _('Communities') |
7 | end | 12 | end |
8 | 13 | ||
14 | + def self.pretty_name | ||
15 | + _('Communities Block') | ||
16 | + end | ||
17 | + | ||
9 | def default_title | 18 | def default_title |
10 | n_('{#} community', '{#} communities', profile_count) | 19 | n_('{#} community', '{#} communities', profile_count) |
11 | end | 20 | end |
app/models/theme.rb
@@ -13,8 +13,14 @@ class Theme | @@ -13,8 +13,14 @@ class Theme | ||
13 | Rails.root.join('public', 'user_themes') | 13 | Rails.root.join('public', 'user_themes') |
14 | end | 14 | end |
15 | 15 | ||
16 | + #FIXME make this test changed | ||
16 | def system_themes_dir | 17 | def system_themes_dir |
17 | - Rails.root.join('public', 'designs', 'themes') | 18 | + Rails.root.join('public', relative_themes_dir) |
19 | + end | ||
20 | + | ||
21 | + #FIXME make this test | ||
22 | + def relative_themes_dir | ||
23 | + File.join('designs', 'themes') | ||
18 | end | 24 | end |
19 | 25 | ||
20 | def create(id, attributes = {}) | 26 | def create(id, attributes = {}) |
@@ -93,6 +99,16 @@ class Theme | @@ -93,6 +99,16 @@ class Theme | ||
93 | config['public'] = value | 99 | config['public'] = value |
94 | end | 100 | end |
95 | 101 | ||
102 | + #FIXME make this test | ||
103 | + def public_path | ||
104 | + File.join('/', self.class.relative_themes_dir, self.id) | ||
105 | + end | ||
106 | + | ||
107 | + #FIXME make this test | ||
108 | + def filesystem_path | ||
109 | + File.join(self.class.system_themes_dir, self.id) | ||
110 | + end | ||
111 | + | ||
96 | def ==(other) | 112 | def ==(other) |
97 | other.is_a?(self.class) && (other.id == self.id) | 113 | other.is_a?(self.class) && (other.id == self.id) |
98 | end | 114 | end |
app/views/box_organizer/index.html.erb
@@ -30,9 +30,9 @@ | @@ -30,9 +30,9 @@ | ||
30 | <br style="clear: left"> | 30 | <br style="clear: left"> |
31 | </div> | 31 | </div> |
32 | <div> | 32 | <div> |
33 | - <%= image_tag(block.icon, height: '48', width: '48', class: 'block-type-icon', alt: '' ) %> | 33 | + <%= display_icon(block) %> |
34 | </div> | 34 | </div> |
35 | - <span><%= _(block.description) %></span> | 35 | + <span><%= _(block.short_description) %></span> |
36 | </div> | 36 | </div> |
37 | 37 | ||
38 | <%= draggable_element("block-#{block.name}", :revert => true) %> | 38 | <%= draggable_element("block-#{block.name}", :revert => true) %> |
app/views/box_organizer/show_block_type_info.html.erb
1 | <div id="block-info-container"> | 1 | <div id="block-info-container"> |
2 | 2 | ||
3 | <div id="bs-block-header"> | 3 | <div id="bs-block-header"> |
4 | - <%= image_tag(@block.icon, height: '48', width: '48', id: 'block-info-icon', alt: '' ) %> | ||
5 | - <h1><%= @block.name %></h1> | 4 | + <%= display_icon(@block) %> |
5 | + <h1><%= @block.pretty_name %></h1> | ||
6 | <p><%= @block.short_description %></p> | 6 | <p><%= @block.short_description %></p> |
7 | </div> | 7 | </div> |
8 | 8 | ||
9 | <div id="block-info-images"> | 9 | <div id="block-info-images"> |
10 | <div style="white-space: nowrap;"> | 10 | <div style="white-space: nowrap;"> |
11 | - <% if @block.previews.empty? %> | 11 | + <% if @block.previews_path.empty? %> |
12 | <% for i in 0..2 %> | 12 | <% for i in 0..2 %> |
13 | <%= image_tag(@block.default_preview, height: '240', width: '384', alt: '') %> | 13 | <%= image_tag(@block.default_preview, height: '240', width: '384', alt: '') %> |
14 | <% end %> | 14 | <% end %> |
15 | <% else %> | 15 | <% else %> |
16 | - <% @block.previews.each do |preview| %> | 16 | + <% @block.previews_path.each do |preview| %> |
17 | <%= image_tag(preview, height: '240', width: '384', alt: '') %> | 17 | <%= image_tag(preview, height: '240', width: '384', alt: '') %> |
18 | <% end %> | 18 | <% end %> |
19 | <% end %> | 19 | <% end %> |
lib/noosfero/plugin.rb
@@ -116,7 +116,7 @@ class Noosfero::Plugin | @@ -116,7 +116,7 @@ class Noosfero::Plugin | ||
116 | def available_plugin_names | 116 | def available_plugin_names |
117 | available_plugins.map { |f| File.basename(f).camelize } | 117 | available_plugins.map { |f| File.basename(f).camelize } |
118 | end | 118 | end |
119 | - | 119 | + |
120 | def all | 120 | def all |
121 | @all ||= available_plugins.map{ |dir| (File.basename(dir) + "_plugin").camelize } | 121 | @all ||= available_plugins.map{ |dir| (File.basename(dir) + "_plugin").camelize } |
122 | end | 122 | end |
@@ -154,6 +154,13 @@ class Noosfero::Plugin | @@ -154,6 +154,13 @@ class Noosfero::Plugin | ||
154 | File.exists?(File.join(root_path, 'controllers', "#{name.underscore}_admin_controller.rb")) | 154 | File.exists?(File.join(root_path, 'controllers', "#{name.underscore}_admin_controller.rb")) |
155 | end | 155 | end |
156 | end | 156 | end |
157 | + | ||
158 | + | ||
159 | + #FIXME make this test | ||
160 | + def has_block?(block) | ||
161 | + self.class.extra_blocks.keys.include?(block) | ||
162 | + end | ||
163 | + | ||
157 | 164 | ||
158 | def expanded_template(file_path, locals = {}) | 165 | def expanded_template(file_path, locals = {}) |
159 | views_path = Rails.root.join('plugins', "#{self.class.public_name}", 'views') | 166 | views_path = Rails.root.join('plugins', "#{self.class.public_name}", 'views') |
3.77 KB
plugins/breadcrumbs/public/images/blocks/communities_block/previews/edit_block.png
0 → 100644
27.9 KB
plugins/breadcrumbs/public/images/blocks/communities_block/previews/view_block.png
0 → 100644
16.1 KB
plugins/breadcrumbs/public/images/blocks/content_breadcrumbs_block/icon.png
0 → 100644
3.77 KB
plugins/breadcrumbs/public/images/blocks/content_breadcrumbs_block/icon2.png
0 → 100644
6.9 KB
plugins/breadcrumbs/public/images/blocks/content_breadcrumbs_block/previews/edit_block.png
0 → 100644
27.9 KB
plugins/breadcrumbs/public/images/blocks/content_breadcrumbs_block/previews/view_block.png
0 → 100644
16.1 KB
public/designs/themes/noosfero/images/blocks/communities_block/icon.png
0 → 100644
3.5 KB
public/designs/themes/noosfero/images/blocks/communities_block/previews/edit_block.png
0 → 100644
27.1 KB
public/designs/themes/noosfero/images/blocks/communities_block/previews/view_block.png
0 → 100644
16 KB
3.98 KB
@@ -0,0 +1,643 @@ | @@ -0,0 +1,643 @@ | ||
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="48px" | ||
14 | + height="48px" | ||
15 | + id="svg2108" | ||
16 | + sodipodi:version="0.32" | ||
17 | + inkscape:version="0.48.3.1 r9886" | ||
18 | + sodipodi:docname="icon.svg" | ||
19 | + inkscape:output_extension="org.inkscape.output.svg.inkscape" | ||
20 | + version="1.1"> | ||
21 | + <defs | ||
22 | + id="defs3"> | ||
23 | + <linearGradient | ||
24 | + id="linearGradient2966"> | ||
25 | + <stop | ||
26 | + style="stop-color:#ffd1d1;stop-opacity:1;" | ||
27 | + offset="0" | ||
28 | + id="stop2968" /> | ||
29 | + <stop | ||
30 | + id="stop3006" | ||
31 | + offset="0.5" | ||
32 | + style="stop-color:#ff1d1d;stop-opacity:1;" /> | ||
33 | + <stop | ||
34 | + style="stop-color:#6f0000;stop-opacity:1;" | ||
35 | + offset="1" | ||
36 | + id="stop2970" /> | ||
37 | + </linearGradient> | ||
38 | + <linearGradient | ||
39 | + id="linearGradient2974"> | ||
40 | + <stop | ||
41 | + style="stop-color:#c1c1c1;stop-opacity:1;" | ||
42 | + offset="0" | ||
43 | + id="stop2976" /> | ||
44 | + <stop | ||
45 | + style="stop-color:#acacac;stop-opacity:1;" | ||
46 | + offset="1" | ||
47 | + id="stop2978" /> | ||
48 | + </linearGradient> | ||
49 | + <linearGradient | ||
50 | + inkscape:collect="always" | ||
51 | + id="linearGradient2984"> | ||
52 | + <stop | ||
53 | + style="stop-color:#e7e2b8;stop-opacity:1;" | ||
54 | + offset="0" | ||
55 | + id="stop2986" /> | ||
56 | + <stop | ||
57 | + style="stop-color:#e7e2b8;stop-opacity:0;" | ||
58 | + offset="1" | ||
59 | + id="stop2988" /> | ||
60 | + </linearGradient> | ||
61 | + <linearGradient | ||
62 | + id="linearGradient2994"> | ||
63 | + <stop | ||
64 | + style="stop-color:#000000;stop-opacity:1;" | ||
65 | + offset="0" | ||
66 | + id="stop2996" /> | ||
67 | + <stop | ||
68 | + style="stop-color:#c9c9c9;stop-opacity:1;" | ||
69 | + offset="1" | ||
70 | + id="stop2998" /> | ||
71 | + </linearGradient> | ||
72 | + <inkscape:perspective | ||
73 | + sodipodi:type="inkscape:persp3d" | ||
74 | + inkscape:vp_x="0 : 24 : 1" | ||
75 | + inkscape:vp_y="0 : 1000 : 0" | ||
76 | + inkscape:vp_z="48 : 24 : 1" | ||
77 | + inkscape:persp3d-origin="24 : 16 : 1" | ||
78 | + id="perspective72" /> | ||
79 | + <linearGradient | ||
80 | + inkscape:collect="always" | ||
81 | + id="linearGradient4356"> | ||
82 | + <stop | ||
83 | + style="stop-color:#000000;stop-opacity:1;" | ||
84 | + offset="0" | ||
85 | + id="stop4358" /> | ||
86 | + <stop | ||
87 | + style="stop-color:#000000;stop-opacity:0;" | ||
88 | + offset="1" | ||
89 | + id="stop4360" /> | ||
90 | + </linearGradient> | ||
91 | + <linearGradient | ||
92 | + id="linearGradient4344"> | ||
93 | + <stop | ||
94 | + style="stop-color:#727e0a;stop-opacity:1;" | ||
95 | + offset="0" | ||
96 | + id="stop4346" /> | ||
97 | + <stop | ||
98 | + style="stop-color:#5b6508;stop-opacity:1.0000000;" | ||
99 | + offset="1.0000000" | ||
100 | + id="stop4348" /> | ||
101 | + </linearGradient> | ||
102 | + <linearGradient | ||
103 | + id="linearGradient4338"> | ||
104 | + <stop | ||
105 | + id="stop4340" | ||
106 | + offset="0.0000000" | ||
107 | + style="stop-color:#e9b15e;stop-opacity:1.0000000;" /> | ||
108 | + <stop | ||
109 | + id="stop4342" | ||
110 | + offset="1.0000000" | ||
111 | + style="stop-color:#966416;stop-opacity:1.0000000;" /> | ||
112 | + </linearGradient> | ||
113 | + <linearGradient | ||
114 | + id="linearGradient4163"> | ||
115 | + <stop | ||
116 | + style="stop-color:#3b74bc;stop-opacity:1.0000000;" | ||
117 | + offset="0.0000000" | ||
118 | + id="stop4165" /> | ||
119 | + <stop | ||
120 | + style="stop-color:#2d5990;stop-opacity:1.0000000;" | ||
121 | + offset="1.0000000" | ||
122 | + id="stop4167" /> | ||
123 | + </linearGradient> | ||
124 | + <linearGradient | ||
125 | + id="linearGradient3824"> | ||
126 | + <stop | ||
127 | + style="stop-color:#ffffff;stop-opacity:1;" | ||
128 | + offset="0" | ||
129 | + id="stop3826" /> | ||
130 | + <stop | ||
131 | + style="stop-color:#c9c9c9;stop-opacity:1.0000000;" | ||
132 | + offset="1.0000000" | ||
133 | + id="stop3828" /> | ||
134 | + </linearGradient> | ||
135 | + <linearGradient | ||
136 | + inkscape:collect="always" | ||
137 | + id="linearGradient3816"> | ||
138 | + <stop | ||
139 | + style="stop-color:#000000;stop-opacity:1;" | ||
140 | + offset="0" | ||
141 | + id="stop3818" /> | ||
142 | + <stop | ||
143 | + style="stop-color:#000000;stop-opacity:0;" | ||
144 | + offset="1" | ||
145 | + id="stop3820" /> | ||
146 | + </linearGradient> | ||
147 | + <linearGradient | ||
148 | + id="linearGradient3800"> | ||
149 | + <stop | ||
150 | + style="stop-color:#f4d9b1;stop-opacity:1.0000000;" | ||
151 | + offset="0.0000000" | ||
152 | + id="stop3802" /> | ||
153 | + <stop | ||
154 | + style="stop-color:#df9725;stop-opacity:1.0000000;" | ||
155 | + offset="1.0000000" | ||
156 | + id="stop3804" /> | ||
157 | + </linearGradient> | ||
158 | + <radialGradient | ||
159 | + inkscape:collect="always" | ||
160 | + xlink:href="#linearGradient3800" | ||
161 | + id="radialGradient3806" | ||
162 | + cx="29.344931" | ||
163 | + cy="17.064077" | ||
164 | + fx="29.344931" | ||
165 | + fy="17.064077" | ||
166 | + r="9.1620579" | ||
167 | + gradientUnits="userSpaceOnUse" /> | ||
168 | + <radialGradient | ||
169 | + inkscape:collect="always" | ||
170 | + xlink:href="#linearGradient3816" | ||
171 | + id="radialGradient3822" | ||
172 | + cx="31.112698" | ||
173 | + cy="19.008621" | ||
174 | + fx="31.112698" | ||
175 | + fy="19.008621" | ||
176 | + r="8.6620579" | ||
177 | + gradientUnits="userSpaceOnUse" /> | ||
178 | + <linearGradient | ||
179 | + inkscape:collect="always" | ||
180 | + xlink:href="#linearGradient3824" | ||
181 | + id="linearGradient3830" | ||
182 | + x1="30.935921" | ||
183 | + y1="29.553486" | ||
184 | + x2="30.935921" | ||
185 | + y2="35.803486" | ||
186 | + gradientUnits="userSpaceOnUse" /> | ||
187 | + <radialGradient | ||
188 | + inkscape:collect="always" | ||
189 | + xlink:href="#linearGradient4163" | ||
190 | + id="radialGradient4169" | ||
191 | + cx="28.089741" | ||
192 | + cy="27.203083" | ||
193 | + fx="28.089741" | ||
194 | + fy="27.203083" | ||
195 | + r="13.565360" | ||
196 | + gradientTransform="matrix(1.297564,2.881172e-16,-1.964720e-16,0.884831,-8.358505,4.940469)" | ||
197 | + gradientUnits="userSpaceOnUse" /> | ||
198 | + <radialGradient | ||
199 | + inkscape:collect="always" | ||
200 | + xlink:href="#linearGradient3800" | ||
201 | + id="radialGradient4171" | ||
202 | + gradientUnits="userSpaceOnUse" | ||
203 | + cx="29.344931" | ||
204 | + cy="17.064077" | ||
205 | + fx="29.344931" | ||
206 | + fy="17.064077" | ||
207 | + r="9.1620579" | ||
208 | + gradientTransform="matrix(0.787998,3.877637e-16,-3.877637e-16,0.787998,6.221198,3.617627)" /> | ||
209 | + <linearGradient | ||
210 | + inkscape:collect="always" | ||
211 | + xlink:href="#linearGradient3824" | ||
212 | + id="linearGradient4175" | ||
213 | + gradientUnits="userSpaceOnUse" | ||
214 | + x1="30.935921" | ||
215 | + y1="29.553486" | ||
216 | + x2="30.935921" | ||
217 | + y2="35.803486" | ||
218 | + gradientTransform="translate(0.707108,0.000000)" /> | ||
219 | + <radialGradient | ||
220 | + inkscape:collect="always" | ||
221 | + xlink:href="#linearGradient3816" | ||
222 | + id="radialGradient4179" | ||
223 | + gradientUnits="userSpaceOnUse" | ||
224 | + cx="31.112698" | ||
225 | + cy="19.008621" | ||
226 | + fx="31.112698" | ||
227 | + fy="19.008621" | ||
228 | + r="8.6620579" /> | ||
229 | + <linearGradient | ||
230 | + inkscape:collect="always" | ||
231 | + xlink:href="#linearGradient3824" | ||
232 | + id="linearGradient4326" | ||
233 | + gradientUnits="userSpaceOnUse" | ||
234 | + gradientTransform="translate(-12.41789,-7.000000)" | ||
235 | + x1="30.935921" | ||
236 | + y1="29.553486" | ||
237 | + x2="30.935921" | ||
238 | + y2="35.803486" /> | ||
239 | + <radialGradient | ||
240 | + inkscape:collect="always" | ||
241 | + xlink:href="#linearGradient4338" | ||
242 | + id="radialGradient4328" | ||
243 | + gradientUnits="userSpaceOnUse" | ||
244 | + gradientTransform="matrix(0.787998,3.877637e-16,-3.877637e-16,0.787998,6.221198,3.617627)" | ||
245 | + cx="29.344931" | ||
246 | + cy="17.064077" | ||
247 | + fx="29.344931" | ||
248 | + fy="17.064077" | ||
249 | + r="9.1620579" /> | ||
250 | + <radialGradient | ||
251 | + inkscape:collect="always" | ||
252 | + xlink:href="#linearGradient3816" | ||
253 | + id="radialGradient4330" | ||
254 | + gradientUnits="userSpaceOnUse" | ||
255 | + cx="31.112698" | ||
256 | + cy="19.008621" | ||
257 | + fx="31.112698" | ||
258 | + fy="19.008621" | ||
259 | + r="8.6620579" /> | ||
260 | + <linearGradient | ||
261 | + inkscape:collect="always" | ||
262 | + xlink:href="#linearGradient3824" | ||
263 | + id="linearGradient4332" | ||
264 | + gradientUnits="userSpaceOnUse" | ||
265 | + x1="30.935921" | ||
266 | + y1="29.553486" | ||
267 | + x2="30.935921" | ||
268 | + y2="35.803486" | ||
269 | + gradientTransform="translate(-13.12500,-7.000000)" /> | ||
270 | + <radialGradient | ||
271 | + inkscape:collect="always" | ||
272 | + xlink:href="#linearGradient3816" | ||
273 | + id="radialGradient4336" | ||
274 | + gradientUnits="userSpaceOnUse" | ||
275 | + cx="31.112698" | ||
276 | + cy="19.008621" | ||
277 | + fx="31.112698" | ||
278 | + fy="19.008621" | ||
279 | + r="8.6620579" /> | ||
280 | + <radialGradient | ||
281 | + inkscape:collect="always" | ||
282 | + xlink:href="#linearGradient4344" | ||
283 | + id="radialGradient4350" | ||
284 | + cx="16.214741" | ||
285 | + cy="19.836468" | ||
286 | + fx="16.214741" | ||
287 | + fy="19.836468" | ||
288 | + r="13.565360" | ||
289 | + gradientTransform="matrix(1.000000,0.000000,0.000000,0.681917,0.000000,8.233773)" | ||
290 | + gradientUnits="userSpaceOnUse" /> | ||
291 | + <linearGradient | ||
292 | + inkscape:collect="always" | ||
293 | + xlink:href="#linearGradient4356" | ||
294 | + id="linearGradient4362" | ||
295 | + x1="20.661695" | ||
296 | + y1="35.817974" | ||
297 | + x2="22.626925" | ||
298 | + y2="36.217758" | ||
299 | + gradientUnits="userSpaceOnUse" | ||
300 | + gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,6.231716,-2.651466)" /> | ||
301 | + <linearGradient | ||
302 | + inkscape:collect="always" | ||
303 | + xlink:href="#linearGradient4356" | ||
304 | + id="linearGradient4366" | ||
305 | + gradientUnits="userSpaceOnUse" | ||
306 | + x1="22.686766" | ||
307 | + y1="36.390400" | ||
308 | + x2="21.408455" | ||
309 | + y2="35.739632" | ||
310 | + gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,55.10960,-3.945209)" /> | ||
311 | + <linearGradient | ||
312 | + inkscape:collect="always" | ||
313 | + xlink:href="#linearGradient4356" | ||
314 | + id="linearGradient4372" | ||
315 | + gradientUnits="userSpaceOnUse" | ||
316 | + gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.072120,-9.824920)" | ||
317 | + x1="20.661695" | ||
318 | + y1="35.817974" | ||
319 | + x2="22.626925" | ||
320 | + y2="36.217758" /> | ||
321 | + <linearGradient | ||
322 | + inkscape:collect="always" | ||
323 | + xlink:href="#linearGradient4356" | ||
324 | + id="linearGradient4374" | ||
325 | + gradientUnits="userSpaceOnUse" | ||
326 | + gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)" | ||
327 | + x1="22.686766" | ||
328 | + y1="36.390400" | ||
329 | + x2="21.408455" | ||
330 | + y2="35.739632" /> | ||
331 | + <linearGradient | ||
332 | + inkscape:collect="always" | ||
333 | + xlink:href="#linearGradient4356" | ||
334 | + id="linearGradient1366" | ||
335 | + gradientUnits="userSpaceOnUse" | ||
336 | + gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)" | ||
337 | + x1="22.686766" | ||
338 | + y1="36.390400" | ||
339 | + x2="21.408455" | ||
340 | + y2="35.739632" /> | ||
341 | + <linearGradient | ||
342 | + inkscape:collect="always" | ||
343 | + xlink:href="#linearGradient4356" | ||
344 | + id="linearGradient1369" | ||
345 | + gradientUnits="userSpaceOnUse" | ||
346 | + gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.072120,-9.824920)" | ||
347 | + x1="20.661695" | ||
348 | + y1="35.817974" | ||
349 | + x2="22.626925" | ||
350 | + y2="36.217758" /> | ||
351 | + <linearGradient | ||
352 | + inkscape:collect="always" | ||
353 | + xlink:href="#linearGradient3824" | ||
354 | + id="linearGradient1372" | ||
355 | + gradientUnits="userSpaceOnUse" | ||
356 | + gradientTransform="translate(-12.41789,-7.000000)" | ||
357 | + x1="30.935921" | ||
358 | + y1="29.553486" | ||
359 | + x2="30.935921" | ||
360 | + y2="35.803486" /> | ||
361 | + <radialGradient | ||
362 | + inkscape:collect="always" | ||
363 | + xlink:href="#linearGradient4344" | ||
364 | + id="radialGradient1381" | ||
365 | + gradientUnits="userSpaceOnUse" | ||
366 | + gradientTransform="matrix(1.000000,0.000000,0.000000,0.681917,0.000000,8.233773)" | ||
367 | + cx="16.214741" | ||
368 | + cy="19.836468" | ||
369 | + fx="16.214741" | ||
370 | + fy="19.836468" | ||
371 | + r="13.565360" /> | ||
372 | + <linearGradient | ||
373 | + inkscape:collect="always" | ||
374 | + xlink:href="#linearGradient2966" | ||
375 | + id="linearGradient2682" | ||
376 | + gradientUnits="userSpaceOnUse" | ||
377 | + gradientTransform="translate(-22.726626,3.0433486)" | ||
378 | + x1="48.90625" | ||
379 | + y1="17.376184" | ||
380 | + x2="50.988335" | ||
381 | + y2="22.250591" /> | ||
382 | + <linearGradient | ||
383 | + inkscape:collect="always" | ||
384 | + xlink:href="#linearGradient2974" | ||
385 | + id="linearGradient2684" | ||
386 | + gradientUnits="userSpaceOnUse" | ||
387 | + gradientTransform="translate(-22.726626,3.0433486)" | ||
388 | + x1="46" | ||
389 | + y1="19.8125" | ||
390 | + x2="47.6875" | ||
391 | + y2="22.625" /> | ||
392 | + <radialGradient | ||
393 | + inkscape:collect="always" | ||
394 | + xlink:href="#linearGradient2984" | ||
395 | + id="radialGradient2686" | ||
396 | + gradientUnits="userSpaceOnUse" | ||
397 | + gradientTransform="matrix(2.923565,0,0,2.029717,-78.612654,-24.840821)" | ||
398 | + cx="29.053354" | ||
399 | + cy="27.640751" | ||
400 | + fx="29.053354" | ||
401 | + fy="27.640751" | ||
402 | + r="3.2408544" /> | ||
403 | + <linearGradient | ||
404 | + inkscape:collect="always" | ||
405 | + xlink:href="#linearGradient2994" | ||
406 | + id="linearGradient2688" | ||
407 | + gradientUnits="userSpaceOnUse" | ||
408 | + gradientTransform="translate(-22.882876,3.1683486)" | ||
409 | + x1="25.71875" | ||
410 | + y1="31.046875" | ||
411 | + x2="25.514589" | ||
412 | + y2="30.703125" /> | ||
413 | + </defs> | ||
414 | + <sodipodi:namedview | ||
415 | + inkscape:showpageshadow="false" | ||
416 | + id="base" | ||
417 | + pagecolor="#ffffff" | ||
418 | + bordercolor="#666666" | ||
419 | + borderopacity="1.0" | ||
420 | + inkscape:pageopacity="0.0" | ||
421 | + inkscape:pageshadow="2" | ||
422 | + inkscape:zoom="5.6568542" | ||
423 | + inkscape:cx="35.364423" | ||
424 | + inkscape:cy="14.908213" | ||
425 | + inkscape:current-layer="layer2" | ||
426 | + showgrid="true" | ||
427 | + inkscape:grid-bbox="true" | ||
428 | + inkscape:document-units="px" | ||
429 | + fill="#9db029" | ||
430 | + stroke="#727e0a" | ||
431 | + inkscape:window-width="1280" | ||
432 | + inkscape:window-height="749" | ||
433 | + inkscape:window-x="65" | ||
434 | + inkscape:window-y="24" | ||
435 | + gridtolerance="9" | ||
436 | + inkscape:window-maximized="0"> | ||
437 | + <inkscape:grid | ||
438 | + type="xygrid" | ||
439 | + id="grid3460" | ||
440 | + visible="true" | ||
441 | + enabled="true" /> | ||
442 | + </sodipodi:namedview> | ||
443 | + <metadata | ||
444 | + id="metadata4"> | ||
445 | + <rdf:RDF> | ||
446 | + <cc:Work | ||
447 | + rdf:about=""> | ||
448 | + <dc:format>image/svg+xml</dc:format> | ||
449 | + <dc:type | ||
450 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
451 | + <dc:title></dc:title> | ||
452 | + <dc:creator> | ||
453 | + <cc:Agent> | ||
454 | + <dc:title>Jakub Steiner</dc:title> | ||
455 | + </cc:Agent> | ||
456 | + </dc:creator> | ||
457 | + <dc:source>http://jimmac.musichall.cz</dc:source> | ||
458 | + <dc:subject> | ||
459 | + <rdf:Bag> | ||
460 | + <rdf:li>users</rdf:li> | ||
461 | + <rdf:li>people</rdf:li> | ||
462 | + </rdf:Bag> | ||
463 | + </dc:subject> | ||
464 | + <cc:license | ||
465 | + rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> | ||
466 | + </cc:Work> | ||
467 | + <cc:License | ||
468 | + rdf:about="http://creativecommons.org/licenses/publicdomain/"> | ||
469 | + <cc:permits | ||
470 | + rdf:resource="http://creativecommons.org/ns#Reproduction" /> | ||
471 | + <cc:permits | ||
472 | + rdf:resource="http://creativecommons.org/ns#Distribution" /> | ||
473 | + <cc:permits | ||
474 | + rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> | ||
475 | + </cc:License> | ||
476 | + </rdf:RDF> | ||
477 | + </metadata> | ||
478 | + <g | ||
479 | + id="layer1" | ||
480 | + inkscape:label="cipek" | ||
481 | + inkscape:groupmode="layer" | ||
482 | + style="display:inline" /> | ||
483 | + <g | ||
484 | + inkscape:groupmode="layer" | ||
485 | + id="layer2" | ||
486 | + inkscape:label="dalsi cipek" | ||
487 | + style="display:inline"> | ||
488 | + <g | ||
489 | + id="g3104" | ||
490 | + inkscape:export-filename="/home/81665687568/Owncloud/projetos/noosfero/public/images/blocks/communities_block/icon.png" | ||
491 | + inkscape:export-xdpi="98.441032" | ||
492 | + inkscape:export-ydpi="98.441032"> | ||
493 | + <path | ||
494 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" | ||
495 | + sodipodi:ry="8.6620579" | ||
496 | + sodipodi:rx="8.6620579" | ||
497 | + sodipodi:cy="19.008621" | ||
498 | + sodipodi:cx="31.112698" | ||
499 | + id="path4177" | ||
500 | + style="display:inline;opacity:1;color:#000000;fill:url(#radialGradient4336);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" | ||
501 | + sodipodi:type="arc" | ||
502 | + transform="matrix(1.77551,0,0,0.959183,-37.37822,11.77153)" /> | ||
503 | + <path | ||
504 | + sodipodi:nodetypes="cczcczc" | ||
505 | + id="path2329" | ||
506 | + d="M 12.861174,34.636039 L 23.467776,34.636039 C 26.472980,34.636039 29.448260,33.534107 30.538843,30.393398 C 31.574482,27.410922 30.715620,21.731340 23.998106,17.135146 L 11.446960,17.135146 C 4.7294460,21.377786 3.8899690,27.179977 5.4365530,30.570174 C 7.0121480,34.023964 9.6791930,34.636039 12.861174,34.636039 z " | ||
507 | + style="display:inline;opacity:1;color:#000000;fill:url(#radialGradient1381);fill-opacity:1;fill-rule:evenodd;stroke:#404604;stroke-width:1px;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;overflow:visible" /> | ||
508 | + <path | ||
509 | + style="display:inline;opacity:1;color:#000000;fill:#9db029;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" | ||
510 | + d="M 17.932367,19.786797 C 17.932367,19.786797 15.781044,21.447132 15.966376,23.447330 C 13.925150,21.646536 13.866503,18.195806 13.866503,18.195806 L 17.932367,19.786797 z " | ||
511 | + id="path3812" | ||
512 | + sodipodi:nodetypes="cccc" /> | ||
513 | + <path | ||
514 | + style="display:inline;opacity:0.21518983000000000;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999976000000002px;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;overflow:visible" | ||
515 | + d="M 12.966639,33.571836 L 23.283309,33.571836 C 25.923032,33.571836 28.536470,32.603917 29.494421,29.845169 C 30.404110,27.225409 29.399699,22.236555 23.499142,18.199332 L 11.974417,18.199332 C 6.0738600,21.925999 5.0864770,27.022551 6.4449710,30.000446 C 7.8289490,33.034200 10.171638,33.571836 12.966639,33.571836 z " | ||
516 | + id="path3838" | ||
517 | + sodipodi:nodetypes="cczcczc" /> | ||
518 | + <path | ||
519 | + sodipodi:nodetypes="cccc" | ||
520 | + id="path3810" | ||
521 | + d="M 18.910795,19.786797 C 18.910795,19.786797 21.062118,21.447132 20.876786,23.447330 C 22.918012,21.646536 22.976659,18.195806 22.976659,18.195806 L 18.910795,19.786797 z " | ||
522 | + style="display:inline;opacity:1;color:#000000;fill:#9db029;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" /> | ||
523 | + <path | ||
524 | + transform="translate(-13.25,-3.5)" | ||
525 | + sodipodi:type="arc" | ||
526 | + style="display:inline;opacity:1;color:#000000;fill:url(#radialGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" | ||
527 | + id="path3814" | ||
528 | + sodipodi:cx="31.112698" | ||
529 | + sodipodi:cy="19.008621" | ||
530 | + sodipodi:rx="8.6620579" | ||
531 | + sodipodi:ry="8.6620579" | ||
532 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" /> | ||
533 | + <path | ||
534 | + transform="translate(-13.125,-7)" | ||
535 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" | ||
536 | + sodipodi:ry="8.6620579" | ||
537 | + sodipodi:rx="8.6620579" | ||
538 | + sodipodi:cy="19.008621" | ||
539 | + sodipodi:cx="31.112698" | ||
540 | + id="path2327" | ||
541 | + style="display:inline;opacity:1;color:#000000;fill:url(#radialGradient4328);fill-opacity:1;fill-rule:evenodd;stroke:#6f4709;stroke-width:1px;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;overflow:visible" | ||
542 | + sodipodi:type="arc" /> | ||
543 | + <path | ||
544 | + transform="matrix(0.877095,0,0,0.877095,-9.301073,-4.663733)" | ||
545 | + sodipodi:type="arc" | ||
546 | + style="display:inline;opacity:0.12658227999999999;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.14012829999999998px;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;overflow:visible" | ||
547 | + id="path3834" | ||
548 | + sodipodi:cx="31.112698" | ||
549 | + sodipodi:cy="19.008621" | ||
550 | + sodipodi:rx="8.6620579" | ||
551 | + sodipodi:ry="8.6620579" | ||
552 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" /> | ||
553 | + <path | ||
554 | + id="path4173" | ||
555 | + d="M 22.583894,27.034641 L 26.826534,27.034641 L 24.351661,24.736544 L 23.821331,25.443651 L 23.291000,24.913321 L 22.583894,27.034641 z " | ||
556 | + style="display:inline;opacity:1;color:#000000;fill:url(#linearGradient1372);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" /> | ||
557 | + <path | ||
558 | + sodipodi:nodetypes="cccc" | ||
559 | + id="path4368" | ||
560 | + d="M 8.5479535,33.601747 C 7.3003465,33.056778 6.7419595,31.743470 6.7419595,31.743470 C 7.5832405,27.674334 10.461885,24.697254 10.461885,24.697254 C 10.461885,24.697254 8.1825635,31.108768 8.5479535,33.601747 z " | ||
561 | + style="display:inline;opacity:0.22784807000000001;color:#000000;fill:url(#linearGradient1369);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" /> | ||
562 | + <path | ||
563 | + style="display:inline;opacity:0.22784807000000001;color:#000000;fill:url(#linearGradient1366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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;overflow:visible" | ||
564 | + d="M 27.453661,32.743396 C 28.684912,32.162418 29.258041,30.741075 29.258041,30.741075 C 28.298921,26.698092 25.281892,23.898254 25.281892,23.898254 C 25.281892,23.898254 27.746485,30.240856 27.453661,32.743396 z " | ||
565 | + id="path4370" | ||
566 | + sodipodi:nodetypes="cccc" /> | ||
567 | + <path | ||
568 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.45064,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" | ||
569 | + sodipodi:ry="8.6620579" | ||
570 | + sodipodi:rx="8.6620579" | ||
571 | + sodipodi:cy="19.008621" | ||
572 | + sodipodi:cx="31.112698" | ||
573 | + id="path4306" | ||
574 | + style="opacity:1;color:black;fill:url(#radialGradient4179);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;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" | ||
575 | + sodipodi:type="arc" | ||
576 | + transform="matrix(1.77551,0,0,0.583984,-24.25322,28.27856)" /> | ||
577 | + <path | ||
578 | + sodipodi:nodetypes="cczcczc" | ||
579 | + id="path4308" | ||
580 | + d="M 25.986174,41.636039 L 36.592776,41.636039 C 39.597980,41.636039 42.573260,40.534107 43.663843,37.393398 C 44.699482,34.410922 43.840620,28.731340 37.123106,24.135146 L 24.571960,24.135146 C 17.854446,28.377786 17.014969,34.179977 18.561553,37.570174 C 20.137148,41.023964 22.804193,41.636039 25.986174,41.636039 z " | ||
581 | + style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4169);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#204a87;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> | ||
582 | + <path | ||
583 | + sodipodi:nodetypes="cccc" | ||
584 | + id="path4310" | ||
585 | + d="M 26.693281,25.726136 C 29.875261,28.554563 31.289475,38.807612 31.289475,38.807612 C 31.289475,38.807612 32.703688,28.554564 35.178562,25.549360 L 26.693281,25.726136 z " | ||
586 | + style="opacity:1.0000000;color:#000000;fill:url(#linearGradient3830);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> | ||
587 | + <path | ||
588 | + style="opacity:1.0000000;color:#000000;fill:#729fcf;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
589 | + d="M 28.972721,26.786797 C 28.972721,26.786797 26.821398,28.447132 27.006730,30.447330 C 24.965504,28.646536 24.906857,25.195806 24.906857,25.195806 L 28.972721,26.786797 z " | ||
590 | + id="path4312" | ||
591 | + sodipodi:nodetypes="cccc" /> | ||
592 | + <path | ||
593 | + style="opacity:0.21518983;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999976px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
594 | + d="M 25.914862,40.593933 L 36.408309,40.571836 C 39.048032,40.571836 41.661470,39.603917 42.619421,36.845169 C 43.529110,34.225409 42.524699,29.236555 36.624142,25.199332 L 25.099417,24.956264 C 19.198860,28.682931 18.056797,33.779483 19.437388,37.000446 C 20.817980,40.221409 22.832599,40.571836 25.914862,40.593933 z " | ||
595 | + id="path4314" | ||
596 | + sodipodi:nodetypes="cczcczc" /> | ||
597 | + <path | ||
598 | + sodipodi:nodetypes="cccc" | ||
599 | + id="path4316" | ||
600 | + d="M 33.410795,26.786797 C 33.410795,26.786797 35.562118,28.447132 35.376786,30.447330 C 37.418012,28.646536 37.476659,25.195806 37.476659,25.195806 L 33.410795,26.786797 z " | ||
601 | + style="opacity:1.0000000;color:#000000;fill:#729fcf;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> | ||
602 | + <path | ||
603 | + transform="translate(-0.125000,3.500000)" | ||
604 | + sodipodi:type="arc" | ||
605 | + style="opacity:1.0000000;color:#000000;fill:url(#radialGradient3822);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
606 | + id="path4318" | ||
607 | + sodipodi:cx="31.112698" | ||
608 | + sodipodi:cy="19.008621" | ||
609 | + sodipodi:rx="8.6620579" | ||
610 | + sodipodi:ry="8.6620579" | ||
611 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" /> | ||
612 | + <path | ||
613 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" | ||
614 | + sodipodi:ry="8.6620579" | ||
615 | + sodipodi:rx="8.6620579" | ||
616 | + sodipodi:cy="19.008621" | ||
617 | + sodipodi:cx="31.112698" | ||
618 | + id="path4320" | ||
619 | + style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4171);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#c17d11;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
620 | + sodipodi:type="arc" /> | ||
621 | + <path | ||
622 | + transform="matrix(0.877095,0.000000,0.000000,0.877095,3.823927,2.336267)" | ||
623 | + sodipodi:type="arc" | ||
624 | + style="opacity:0.19620253;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.1401283px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
625 | + id="path4322" | ||
626 | + sodipodi:cx="31.112698" | ||
627 | + sodipodi:cy="19.008621" | ||
628 | + sodipodi:rx="8.6620579" | ||
629 | + sodipodi:ry="8.6620579" | ||
630 | + d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" /> | ||
631 | + <path | ||
632 | + sodipodi:nodetypes="cccc" | ||
633 | + id="path4354" | ||
634 | + d="M 21.851790,40.775197 C 20.604183,40.230228 20.045796,38.916920 20.045796,38.916920 C 20.887077,34.847784 23.765721,31.870704 23.765721,31.870704 C 23.765721,31.870704 21.486400,38.282218 21.851790,40.775197 z " | ||
635 | + style="opacity:0.22784807;color:#000000;fill:url(#linearGradient4362);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" /> | ||
636 | + <path | ||
637 | + style="opacity:0.22784807;color:#000000;fill:url(#linearGradient4366);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" | ||
638 | + d="M 40.757497,39.916846 C 41.988748,39.335868 42.561877,37.914525 42.561877,37.914525 C 41.602757,33.871542 38.585728,31.071704 38.585728,31.071704 C 38.585728,31.071704 41.050321,37.414306 40.757497,39.916846 z " | ||
639 | + id="path4364" | ||
640 | + sodipodi:nodetypes="cccc" /> | ||
641 | + </g> | ||
642 | + </g> | ||
643 | +</svg> |
27.6 KB
15.7 KB
test/unit/block_test.rb
@@ -7,6 +7,10 @@ class BlockTest < ActiveSupport::TestCase | @@ -7,6 +7,10 @@ class BlockTest < ActiveSupport::TestCase | ||
7 | assert_kind_of String, Block.description | 7 | assert_kind_of String, Block.description |
8 | end | 8 | end |
9 | 9 | ||
10 | + should 'describe shotly itself' do | ||
11 | + assert_kind_of String, Block.short_description | ||
12 | + end | ||
13 | + | ||
10 | should 'access owner through box' do | 14 | should 'access owner through box' do |
11 | user = create_user('testinguser').person | 15 | user = create_user('testinguser').person |
12 | 16 | ||
@@ -284,4 +288,80 @@ class BlockTest < ActiveSupport::TestCase | @@ -284,4 +288,80 @@ class BlockTest < ActiveSupport::TestCase | ||
284 | assert_equal block.cache_key('en'), block.cache_key('en', person) | 288 | assert_equal block.cache_key('en'), block.cache_key('en', person) |
285 | end | 289 | end |
286 | 290 | ||
291 | + should 'pretty_name method defined' do | ||
292 | + assert Block.respond_to?(:pretty_name) | ||
293 | + end | ||
294 | + | ||
295 | + should 'previews_path return the array of preview images' do | ||
296 | + class NewBlock < Block; end | ||
297 | + Dir.stubs(:glob).returns(['/path/1', 'path/2']) | ||
298 | + expected = ['blocks/block_test/new_block/previews/1', 'blocks/block_test/new_block/previews/2'] | ||
299 | + assert_equivalent expected, NewBlock.previews_path | ||
300 | + end | ||
301 | + | ||
302 | + should 'return the icon block path' do | ||
303 | + class NewBlock < Block; end | ||
304 | + File.expects(:exists?).returns(true) | ||
305 | + expected_path = 'path/icon.png' | ||
306 | + File.stubs(:join).returns(expected_path) | ||
307 | + assert_equal expected_path, NewBlock.icon_path | ||
308 | + end | ||
309 | + | ||
310 | + should 'return the icon block path for plugin blocks' do | ||
311 | + module SomeContext class SomeContext::CustomBlock1 < Block; end;;end | ||
312 | +# class SomeContext::CustomBlock2 < Block; end; | ||
313 | +#BreadcrumbsPlugin::ContentBreadcrumbsBlock | ||
314 | + class Plugin1 < Noosfero::Plugin | ||
315 | + def self.extra_blocks | ||
316 | + { | ||
317 | + CustomBlock1 => {}, | ||
318 | + CustomBlock2 => {} | ||
319 | + } | ||
320 | + end | ||
321 | + end | ||
322 | + | ||
323 | +#Block.stubs(:images_filesystem_path).returns('/path') | ||
324 | +#CustomBlock1.stubs(:images_filesystem_path).returns('/path') | ||
325 | +File.stubs(:exists?).with('/home/81665687568/Owncloud/projetos/noosfero/public/images/blocks/block_test/custom_block1/icon.pn').returns(true) | ||
326 | +# File.exists?(File.join(images_filesystem_path, 'icon.png')) ? icon_path : default_icon_path | ||
327 | + | ||
328 | + | ||
329 | +# def self.images_filesystem_path | ||
330 | +# Rails.root.join('public', 'images', images_base_url_path) | ||
331 | +# end | ||
332 | +# | ||
333 | +# def self.images_base_url_path | ||
334 | +# File.join('blocks', self.name.underscore) | ||
335 | +# end | ||
336 | + | ||
337 | + | ||
338 | + Environment.destroy_all | ||
339 | + e = fast_create(Environment, :is_default => true) | ||
340 | + | ||
341 | +# Noosfero::Plugin.stubs(:all).returns(['ProfileTest::Plugin1', 'ProfileTest::Plugin2']) | ||
342 | + e.enable_plugin(Plugin1) | ||
343 | + | ||
344 | +# class NewBlock < Block; end | ||
345 | +# Dir.stubs(:glob).returns(['/path/1', 'path/2']) | ||
346 | +# expected = ['blocks/block_test/new_block/previews/1', 'blocks/block_test/new_block/previews/2'] | ||
347 | +# class NewBlock < Block; end | ||
348 | +# File.expects(:exists?).returns(true) | ||
349 | +# expected_path = 'path/icon.png' | ||
350 | +# File.stubs(:join).returns(expected_path) | ||
351 | +#/plugins/container_block/images/handle_e.png | ||
352 | + assert_equal '', SomeContext::CustomBlock1.icon_path | ||
353 | + end | ||
354 | + | ||
355 | + | ||
356 | + should 'return the default icon for blocks without icon' do | ||
357 | + class NewBlock < Block; end | ||
358 | + File.expects(:exists?).returns(false) | ||
359 | + assert_equal 'icon_block.png', NewBlock.icon_path | ||
360 | + end | ||
361 | + | ||
362 | + should 'previews_path return an empty array if there is no preview image' do | ||
363 | + class NewBlock < Block; end | ||
364 | + assert_equivalent [], NewBlock.previews_path | ||
365 | + end | ||
366 | + | ||
287 | end | 367 | end |
test/unit/communities_block_test.rb
@@ -15,6 +15,15 @@ class CommunitiesBlockTest < ActiveSupport::TestCase | @@ -15,6 +15,15 @@ class CommunitiesBlockTest < ActiveSupport::TestCase | ||
15 | assert_not_equal ProfileListBlock.description, CommunitiesBlock.description | 15 | assert_not_equal ProfileListBlock.description, CommunitiesBlock.description |
16 | end | 16 | end |
17 | 17 | ||
18 | + should 'describe shortly itself' do | ||
19 | + assert_not_equal Block.short_description, CommunitiesBlock.short_description | ||
20 | + end | ||
21 | + | ||
22 | + should 'have a pretty name defined' do | ||
23 | + pretty_name = CommunitiesBlock.name.gsub('Block','') | ||
24 | + assert_not_equal pretty_name, CommunitiesBlock.pretty_name | ||
25 | + end | ||
26 | + | ||
18 | should 'list owner communities' do | 27 | should 'list owner communities' do |
19 | block = CommunitiesBlock.new | 28 | block = CommunitiesBlock.new |
20 | 29 |