Commit 27c5a48cffd3b23e64a31437adb543740e4bdbcc
1 parent
e66821bd
Exists in
sisp_simple_version
Added sisp data tab block
Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com> Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
7 changed files
with
59 additions
and
0 deletions
Show diff stats
src/noosfero-spb/software_communities/lib/sisp_tab_data_block.rb
0 → 100644
... | ... | @@ -0,0 +1,23 @@ |
1 | +class SispTabDataBlock < SoftwareTabDataBlock | |
2 | + def self.description | |
3 | + _('Sisp Tab Data') | |
4 | + end | |
5 | + | |
6 | + def help | |
7 | + _('This block is used to display SISP Data') | |
8 | + end | |
9 | + | |
10 | + def content(args={}) | |
11 | + block = self | |
12 | + | |
13 | + lambda do |object| | |
14 | + render( | |
15 | + :file => 'blocks/sisp_tab_data', | |
16 | + :locals => { | |
17 | + :block => block | |
18 | + } | |
19 | + ) | |
20 | + end | |
21 | + end | |
22 | + | |
23 | +end | ... | ... |
src/noosfero-spb/software_communities/lib/software_communities_plugin.rb
... | ... | @@ -46,6 +46,7 @@ class SoftwareCommunitiesPlugin < Noosfero::Plugin |
46 | 46 | SearchCatalogBlock => { :type => [Environment] }, |
47 | 47 | SoftwareHighlightsBlock => { :type => [Environment] }, |
48 | 48 | SoftwareTabDataBlock => {:type => [Community], :position => 1}, |
49 | + SispTabDataBlock => {:type => [Community], :position => 1}, | |
49 | 50 | WikiBlock => {:type => [Community]}, |
50 | 51 | StatisticBlock => { :type => [Community] }, |
51 | 52 | SoftwareEventsBlock => { :type => [Community] } | ... | ... |
src/noosfero-spb/software_communities/views/blocks/sisp/_about_tab.html.erb
0 → 100644
... | ... | @@ -0,0 +1,10 @@ |
1 | +<div id="article" class="blog"> | |
2 | + <h2>Sobre o Software</h2> | |
3 | + <p><%= block.owner.software_info.finality %></p> | |
4 | + <h2>Sobre o Software</h2> | |
5 | + <p>block.owner.software_info.finality</p> | |
6 | + <h2>Sobre o Software</h2> | |
7 | + <p>block.owner.software_info.finality</p> | |
8 | + <h2>Sobre o Software</h2> | |
9 | + <p>block.owner.software_info.finality</p> | |
10 | +</div> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/sisp/_general_info_tab.html.erb
0 → 100644
src/noosfero-spb/software_communities/views/blocks/sisp/_more_info_tab.html.erb
0 → 100644
src/noosfero-spb/software_communities/views/blocks/sisp_tab_data.html.erb
0 → 100644
... | ... | @@ -0,0 +1,13 @@ |
1 | +<% if block.owner.software_info.nil? %> | |
2 | + <%= _("This community needs a software to use this block") %> | |
3 | +<% else %> | |
4 | + <div id="block-community-tabs"> | |
5 | + <% tabs = [] %> | |
6 | + <% tabs << {:title => "Sobre o Software", :id => 'about-sisp-tab', :content => (render partial: "blocks/sisp/about_tab", :locals => {block: block})} %> | |
7 | + <% tabs << {:title => "Informações Gerais", :id => 'sisp-general-info-tab', :content => (render partial: "blocks/sisp/general_info_tab", :locals => {block: block})} %> | |
8 | + <% tabs << {:title => "Informações Complementares", :id => 'sisp-more-info-tab', :content => (render partial: "blocks/sisp/more_info_tab", :locals => {block: block})} %> | |
9 | + | |
10 | + <%= render_tabs(tabs) %> | |
11 | + </div> | |
12 | +<% end %> | |
13 | + | ... | ... |
src/noosfero-spb/software_communities/views/box_organizer/_search_catalog_block.html.erb
0 → 100644