diff --git a/lib/softwares_block.rb b/lib/softwares_block.rb index 0f37f8e..680567d 100644 --- a/lib/softwares_block.rb +++ b/lib/softwares_block.rb @@ -75,4 +75,16 @@ class SoftwaresBlock < CommunitiesBlock result.slice(0..get_limit-1) end + + def content(arg={}) + if self.box.owner_type == "Environment" && self.box.position == 1 + block = self + + proc do + render :file => 'blocks/main_area_softwares', :locals => { :profiles=> block.profile_list() } + end + else + super(arg) + end + end end diff --git a/public/style.css b/public/style.css index f86144c..121bb08 100644 --- a/public/style.css +++ b/public/style.css @@ -197,4 +197,30 @@ .improve_input_size { width: 315px !important; -} \ No newline at end of file +} + +.software-block { + position: relative; + float: left; + margin: 0px 5px 5px 0px; + padding: 5px; + width: 30%; +} + +.software-block-content { + position: relative; + background-color: red; + z-index: 10; +} + +.software-block-logo { + width: 150px; + height: 150px; + margin: 0px auto; +} + +.software-block-finality { + position: relative; + background-color: #333; + z-index: 20; +} diff --git a/views/blocks/main_area_softwares.html.erb b/views/blocks/main_area_softwares.html.erb new file mode 100644 index 0000000..343a9c3 --- /dev/null +++ b/views/blocks/main_area_softwares.html.erb @@ -0,0 +1,24 @@ +<% profiles.each do |profile| %> +
+
+ + +
+
+

<%=profile.name%>

+
+
<%= profile.description %>
+
+
+ +
+

+ <%= profile.software_info.finality %> +

+ + <%= link_to _("See More"), profile.url %> +
+
+<% end %> \ No newline at end of file -- libgit2 0.21.2