Commit 6a3d8d37aea48c72b6031492e536f2b224b671e8
1 parent
d38eca1b
Exists in
master
and in
5 other branches
reformulacao_software: Fix dynamic tables initial display
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Luiz Matos <luizff.matos@gmail.com>
Showing
5 changed files
with
9 additions
and
17 deletions
Show diff stats
views/mpog_software_plugin_myprofile/_database_fields.html.erb
views/mpog_software_plugin_myprofile/_language_fields.html.erb
views/mpog_software_plugin_myprofile/_library_fields.html.erb
views/mpog_software_plugin_myprofile/_operating_system_fields.html.erb
1 | 1 | <%= fields_for :operating_systems ,@operating_systems do |lib| %> |
2 | 2 | |
3 | 3 | <div id='operating_systems'> |
4 | + <% operating_systems_fields = [] if operating_systems_fields.nil? %> | |
4 | 5 | <% OperatingSystemHelper.operating_system_as_tables(operating_systems_fields).each do |tab| %> |
5 | 6 | <%= tab.call %> |
6 | 7 | <% end %> | ... | ... |
views/mpog_software_plugin_myprofile/_public_software_info.html.erb
... | ... | @@ -65,42 +65,30 @@ |
65 | 65 | |
66 | 66 | <div id='libraries_fields'> |
67 | 67 | <h4> <%= _("Libraries") %> </h4> |
68 | - <% if @list_libraries.blank? %> | |
69 | - <%= LibraryHelper.library_as_tables(nil).call %> | |
70 | - <% else %> | |
71 | - <%= render :partial => 'library_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :libraries => @list_libraries } %> | |
72 | - <% end %> | |
68 | + | |
69 | + <%= render :partial => 'library_fields', :locals => {:object_name => 'community', :profile => @community, :libraries => @list_libraries } %> | |
73 | 70 | </div> |
74 | 71 | <br /> |
75 | 72 | |
76 | 73 | <div id='operating_system_fields'> |
77 | 74 | <h4> <%= _("Operating Systems") %> </h4> |
78 | - <% if @list_operating_systems.blank? %> | |
79 | - <%= OperatingSystemHelper.operating_system_as_tables(nil, false).call %> | |
80 | - <% else %> | |
75 | + | |
81 | 76 | <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> |
82 | - <% end %> | |
83 | 77 | </div> |
84 | 78 | <br /> |
85 | 79 | |
86 | 80 | <br /> |
87 | 81 | <div id='programming_languages_fields'> |
88 | 82 | <h4> <%= _("Programming languages") %> </h4> |
89 | - <% if @list_languages.blank? %> | |
90 | - <%= SoftwareLanguageHelper.language_as_tables(nil, false).call %> | |
91 | - <% else %> | |
83 | + | |
92 | 84 | <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> |
93 | - <% end %> | |
94 | 85 | </div> |
95 | 86 | |
96 | 87 | <br /> |
97 | 88 | <div id='database_fields'> |
98 | 89 | <h4> <%= _("Databases") %> </h4> |
99 | - <% if @list_databases.blank? %> | |
100 | - <%= DatabaseHelper.database_as_tables(nil, true).call %> | |
101 | - <% else %> | |
90 | + | |
102 | 91 | <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> |
103 | - <% end %> | |
104 | 92 | </div> |
105 | 93 | |
106 | 94 | <div id="software_categories_fields"> | ... | ... |