Commit 22c568e8fc54352d64e1615b3cd5a6a393612361
1 parent
1d194ed0
Exists in
software_as_organization
general views fixes
Showing
7 changed files
with
30 additions
and
52 deletions
Show diff stats
src/noosfero-spb/software_communities/views/blocks/download.html.erb
| 1 | -<% if block.owner.software_info.nil? %> | |
| 2 | - <%= _("This community needs a software to use this block") %> | |
| 3 | -<% else %> | |
| 4 | - <h3 class="block-title"> <%= _("Download #{block.owner.software_info.software.name}") %> </h3> | |
| 5 | - <ul class="download-list"> | |
| 6 | - <% block.downloads.each_with_index do |download, index| %> | |
| 7 | - <li id="download-item-<%=(index+1)%>"> | |
| 8 | - <div class="download-button"> | |
| 9 | - <%= link_to :controller => 'software_communities_plugin_profile', :action=> 'download_file', :block=>block.id, :download_index=> index , title: _("Download the software") do %> | |
| 1 | +<h3 class="block-title"> <%= _("Download #{block.owner.name}") %> </h3> | |
| 2 | +<ul class="download-list"> | |
| 3 | + <% block.downloads.each_with_index do |download, index| %> | |
| 4 | + <li id="download-item-<%=(index+1)%>"> | |
| 5 | + <div class="download-button"> | |
| 6 | + <%= link_to :controller => 'software_communities_plugin_profile', :action=> 'download_file', :block=>block.id, :download_index=> index , title: _("Download the software") do %> | |
| 10 | 7 | <span class="download-image"></span> |
| 11 | 8 | <span class="download-size"><%= download[:size] %></span> |
| 12 | - <% end %> | |
| 13 | - </div> | |
| 14 | - <div class="download-info"> | |
| 15 | - <span class="download-name"><%= _("#{download[:name]}") %></span> | |
| 16 | - <span class="download-platform"><%= _("Platform:#{download[:software_description]}") %> </span> | |
| 17 | - <span class="min-requirements"><%= link_to _("Minimum Requirements"), download[:minimum_requirements] %></span> | |
| 18 | - </div> | |
| 19 | - </li> | |
| 20 | - <% end %> | |
| 21 | - </ul> | |
| 22 | - <div id="licensed-software"> | |
| 23 | - <%= link_to _("License: #{block.owner.software_info.license_info.version}"), block.owner.software_info.license_info.link %> | |
| 24 | - </div> | |
| 25 | -<% end %> | |
| 9 | + <% end %> | |
| 10 | + </div> | |
| 11 | + <div class="download-info"> | |
| 12 | + <span class="download-name"><%= _("#{download[:name]}") %></span> | |
| 13 | + <span class="download-platform"><%= _("Platform:#{download[:software_description]}") %> </span> | |
| 14 | + <span class="min-requirements"><%= link_to _("Minimum Requirements"), download[:minimum_requirements] %></span> | |
| 15 | + </div> | |
| 16 | + </li> | |
| 17 | + <% end %> | |
| 18 | +</ul> | |
| 19 | +<div id="licensed-software"> | |
| 20 | + <%= link_to _("License: #{block.owner.software_info.license_info.version}"), block.owner.software_info.license_info.link %> | |
| 21 | +</div> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/repository.html.erb
| 1 | -<% if block.owner.software_info.nil? %> | |
| 2 | - <%= _("This community needs a software to use this block") %> | |
| 3 | -<% else %> | |
| 4 | - <%= link_to _("Repository") , block.owner.software_info.repository_link, :id => "bt_repositorio", :target => "_blank" %> | |
| 5 | -<% end %> | |
| 1 | +<%= link_to _("Repository") , block.owner.software_info.repository_link, :id => "bt_repositorio", :target => "_blank" %> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/software_information.html.erb
| 1 | 1 | <div class="vcard"> |
| 2 | - | |
| 3 | -<% if block.owner.software_info.nil? %> | |
| 4 | - <%= _("This community needs a software to use this block") %> | |
| 5 | -<% else %> | |
| 6 | 2 | <table id="software-information-block-table"> |
| 7 | 3 | <tr> |
| 8 | 4 | <td width="30%" id="col-profile-big-image"> |
| ... | ... | @@ -32,5 +28,4 @@ |
| 32 | 28 | </td> |
| 33 | 29 | </tr> |
| 34 | 30 | </table> |
| 35 | -<% end %> | |
| 36 | 31 | </div> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/software_tab_data.html.erb
| 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 => _("Discussions"), :id => 'discussions-tab', :content => ""} %> | |
| 7 | - <% tabs << {:title => _("Blog"), :id => 'blog-tab', :content => (render partial: "blocks/software_tab_blog", :locals => {block: block})} %> | |
| 8 | - <% tabs << {:title => _("Repository Feed"), :id => 'repository-feed-tab', :content => ""} %> | |
| 9 | - | |
| 10 | - <%= render_tabs(tabs) %> | |
| 11 | - </div> | |
| 12 | -<% end %> | |
| 1 | +<div id="block-community-tabs"> | |
| 2 | + <% tabs = [] %> | |
| 3 | + <% tabs << {:title => _("Discussions"), :id => 'discussions-tab', :content => ""} %> | |
| 4 | + <% tabs << {:title => _("Blog"), :id => 'blog-tab', :content => (render partial: "blocks/software_tab_blog", :locals => {block: block})} %> | |
| 5 | + <% tabs << {:title => _("Repository Feed"), :id => 'repository-feed-tab', :content => ""} %> | |
| 13 | 6 | |
| 7 | + <%= render_tabs(tabs) %> | |
| 8 | +</div> | ... | ... |
src/noosfero-spb/software_communities/views/blocks/wiki.html.erb
| 1 | -<% if block.owner.software_info.nil? %> | |
| 2 | - <%= _("This community needs a software to use this block") %> | |
| 3 | -<% else %> | |
| 4 | - <%= link_to _("Wiki") , block.wiki_link, :id => "bt_wiki", :target => "_blank" %> | |
| 5 | -<% end %> | |
| 1 | +<%= link_to _("Wiki") , block.wiki_link, :id => "bt_wiki", :target => "_blank" %> | |
| 6 | 2 | ... | ... |
src/noosfero-spb/software_communities/views/profile/index.html.erb
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <%= button :control_panel, _('Control Panel'), profile.admin_url %> |
| 18 | 18 | </div> |
| 19 | 19 | <% end %> |
| 20 | - <% if profile.is_a? Community %> | |
| 20 | + <% if profile.is_a?(Community) || profile.is_a?(Software) %> | |
| 21 | 21 | <%= render "blocks/profile_info_actions/join_leave_community" %> |
| 22 | 22 | <% end %> |
| 23 | 23 | </div> | ... | ... |
src/noosfero-spb/software_communities/views/profile/members.html.erb
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | |
| 43 | 43 | <% button_bar do %> |
| 44 | 44 | <%= button :back, _('Go back'), { :controller => 'profile' } %> |
| 45 | - <% if profile.community? and user %> | |
| 45 | + <% if (profile.community? || profile.kind_of?(Software)) and user %> | |
| 46 | 46 | <% if user.has_permission?(:invite_members, profile) %> |
| 47 | 47 | <%= button :person, _('Invite people to join'), :controller => 'invite', :action => 'invite_friends' %> |
| 48 | 48 | <% end %> | ... | ... |