Commit f5240f14262e48c9ee5915052e6f6d06a9600d4b
Committed by
Fabio Teixeira
1 parent
e2d02861
Exists in
master
and in
5 other branches
Add dropdown section, fix javascript
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com> Signed-off-by: Parley Martins <parley@outlook.com>
Showing
2 changed files
with
178 additions
and
174 deletions
Show diff stats
public/mpog-software.js
1 | 1 | jQuery(document).ready(function(){ |
2 | - jQuery(".control-panel")[0].innerHTML = jQuery(".control-panel-edit-profile-group:contains('Software')")[0].outerHTML + jQuery(".control-panel")[0].innerHTML | |
3 | - jQuery(".control-panel-edit-profile-group:contains('Software')")[1].remove() | |
2 | + if(jQuery(".control-panel").size() > 0 && jQuery(".control-panel-edit-profile-group:contains('Software')").size() > 0 ) { | |
3 | + jQuery(".control-panel")[0].innerHTML = jQuery(".control-panel-edit-profile-group:contains('Software')")[0].outerHTML + jQuery(".control-panel")[0].innerHTML | |
4 | + jQuery(".control-panel-edit-profile-group:contains('Software')")[1].remove() | |
5 | + } | |
4 | 6 | }); |
5 | 7 | \ No newline at end of file | ... | ... |
views/mpog_software_plugin_myprofile/_public_software_info.html.erb
1 | -<h1><%= _('Edit software') %></h1> | |
2 | - | |
3 | -<div> | |
4 | - <div class="formfield type-text"> | |
5 | - <%= label_tag("acronym" ,_("Acronym"), :class=>"formlabel") %> | |
6 | - <%= text_field_tag(:acronym) %> | |
7 | - </div> | |
8 | - | |
9 | - <div class="formfieldline"> | |
10 | - <%= label_tag _("Adherent to e-PING ?") %> | |
11 | - | |
12 | - <%= label_tag "e_ping_true", "Yes" %> | |
13 | - <%= radio_button_tag(:e_ping,true)%> | |
14 | - <%= label_tag "e_ping_false", "No"%> | |
15 | - <%= radio_button_tag(:e_ping,false)%> | |
16 | - </div> | |
17 | - | |
18 | - <div class="formfieldline"> | |
19 | - <%= label_tag _("Adherent to e-MAG ?") %> | |
20 | - | |
21 | - <%= label_tag "e_mag_true", "Yes"%> | |
22 | - <%= radio_button_tag(:e_mag,true)%> | |
23 | - <%= label_tag "e_mag_false", "No"%> | |
24 | - <%= radio_button_tag(:e_mag,false)%> | |
25 | - </div> | |
26 | - | |
27 | - <div class="formfieldline"> | |
28 | - <%= label_tag _("Adherent to ICP-Brasil ?") %> | |
29 | - | |
30 | - <%= label_tag "icp_brasil_true", "Yes"%> | |
31 | - <%= radio_button_tag(:icp_brasil,true)%> | |
32 | - <%= label_tag "icp_brasil_false", "No"%> | |
33 | - <%= radio_button_tag(:icp_brasil,false)%> | |
34 | - </div> | |
35 | - | |
36 | - <div class="formfieldline"> | |
37 | - <%= label_tag _("Adherent to e-ARQ ?") %> | |
38 | - | |
39 | - <%= label_tag "e_arq_true", "Yes"%> | |
40 | - <%= radio_button_tag(:e_arq,true)%> | |
41 | - <%= label_tag "e_arq_false", "No"%> | |
42 | - <%= radio_button_tag(:e_arq,false)%> | |
43 | - </div> | |
44 | - | |
45 | - <div class="formfieldline"> | |
46 | - <%= label_tag _("Internacionalizable ?") %> | |
47 | - | |
48 | - <%= label_tag "intern_true", "Yes" %> | |
49 | - <%= radio_button_tag(:intern,true)%> | |
50 | - <%= label_tag "intern_false", "No"%> | |
51 | - <%= radio_button_tag(:intern,false)%> | |
52 | - <div class="formfieldline"> | |
53 | - <%= label_tag "operating_platform", _("Operating Platform: ") %> <br /> | |
54 | - <%= text_area_tag :operating_platform %> | |
55 | - </div> | |
56 | - | |
57 | - <div class="formfieldline"> | |
58 | - <%= label_tag "objectives", _("Objectives: ")%><br /> | |
59 | - <%= text_area_tag :objectives %> | |
60 | - </div> | |
61 | - | |
62 | - <div class="formfieldline"> | |
63 | - <%= label_tag "features", _("Features: ")%><br /> | |
64 | - <%= text_area_tag :features %> | |
65 | - </div> | |
66 | - | |
67 | - <div id='libraries_fields'> | |
68 | - <h4> <%= _("Libraries") %> </h4> | |
69 | - <% if @list_libraries.blank? %> | |
70 | - <%= LibraryHelper.library_as_tables(nil).call %> | |
71 | - <% else %> | |
72 | - <%= render :partial => 'library_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :libraries => @list_libraries } %> | |
73 | - <% end %> | |
74 | - </div> | |
75 | - <br /> | |
76 | - | |
77 | - <div id='operating_system_fields'> | |
78 | - <h4> <%= _("Operating Systems") %> </h4> | |
79 | - <% if @list_operating_systems.blank? %> | |
80 | - <%= OperatingSystemHelper.operating_system_as_tables(nil, false).call %> | |
81 | - <% else %> | |
82 | - <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> | |
83 | - <% end %> | |
84 | - </div> | |
85 | - <br /> | |
86 | - | |
87 | - <br /> | |
88 | - <div id='programming_languages_fields'> | |
89 | - <h4> <%= _("Programming languages") %> </h4> | |
90 | - <% if @list_languages.blank? %> | |
91 | - <%= SoftwareLanguageHelper.language_as_tables(nil, false).call %> | |
92 | - <% else %> | |
93 | - <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> | |
94 | - <% end %> | |
95 | - </div> | |
96 | - | |
97 | - <br /> | |
98 | - <div id='database_fields'> | |
99 | - <h4> <%= _("Databases") %> </h4> | |
100 | - <% if @list_databases.blank? %> | |
101 | - <%= DatabaseHelper.database_as_tables(nil, true).call %> | |
102 | - <% else %> | |
103 | - <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> | |
104 | - <% end %> | |
105 | - </div> | |
106 | - | |
107 | - <div id="software_categories_fields"> | |
108 | - <h4> <%= _("Software Categories:") %> </h4> | |
109 | - | |
110 | - <%= check_box_tag :administration %> | |
111 | - <%= label_tag :administration, _("Administration") %><br /> | |
112 | - | |
113 | - <%= check_box_tag :agriculture %> | |
114 | - <%= label_tag :agriculture, _("Agriculture") %><br /> | |
115 | - | |
116 | - <%= check_box_tag :business_and_services %> | |
117 | - <%= label_tag :business_and_services, _("Business_and Services") %><br /> | |
118 | - | |
119 | - <%= check_box_tag :communication %> | |
120 | - <%= label_tag :communication, _("Communication") %><br /> | |
121 | - | |
122 | - <%= check_box_tag :culture %> | |
123 | - <%= label_tag :culture, _("Culture") %><br /> | |
124 | - | |
125 | - <%= check_box_tag :national_defense %> | |
126 | - <%= label_tag :national_defense, _("National Defense") %><br /> | |
127 | - | |
128 | - <%= check_box_tag :economy_and_finances %> | |
129 | - <%= label_tag :economy_and_finances, _("Economy and Finances") %><br /> | |
130 | - | |
131 | - <%= check_box_tag :education %> | |
132 | - <%= label_tag :education, _("Education") %><br /> | |
133 | - | |
134 | - <%= check_box_tag :energy %> | |
135 | - <%= label_tag :energy, _("Energy") %><br /> | |
136 | - | |
137 | - <%= check_box_tag :sports %> | |
138 | - <%= label_tag :sports, _("Sports") %><br /> | |
139 | - | |
140 | - <%= check_box_tag :habitation %> | |
141 | - <%= label_tag :habitation, _("Habitation") %><br /> | |
142 | - | |
143 | - <%= check_box_tag :industry %> | |
144 | - <%= label_tag :industry, _("Industry") %><br /> | |
145 | - | |
146 | - <%= check_box_tag :environment %> | |
147 | - <%= label_tag :environment, _("Environment") %><br /> | |
148 | - | |
149 | - <%= check_box_tag :research_and_development %> | |
150 | - <%= label_tag :research_and_development, _("Research and Development") %><br /> | |
151 | - | |
152 | - <%= check_box_tag :social_security %> | |
153 | - <%= label_tag :social_security, _("Social Security") %><br /> | |
154 | - | |
155 | - <%= check_box_tag :social_protection %> | |
156 | - <%= label_tag :social_protection, _("Social Protection") %><br /> | |
157 | - | |
158 | - <%= check_box_tag :sanitation %> | |
159 | - <%= label_tag :sanitation, _("Sanitation") %><br /> | |
160 | - | |
161 | - <%= check_box_tag :health %> | |
162 | - <%= label_tag :health, _("Health") %><br /> | |
163 | - | |
164 | - <%= check_box_tag :security_public_order %> | |
165 | - <%= label_tag :security_public_order, _("Security and Public Order") %><br /> | |
1 | +<h1 class="database-button-show"><a href="#" class="button with-text icon-add"><%= _('Show edit software') %></a></h1> | |
2 | +<h1 class="database-button-hide"><%= _('Edit software') %></h1> | |
3 | +<div class = "database-info "> | |
4 | + <div> | |
5 | + <div class="formfield type-text"> | |
6 | + <%= label_tag("acronym" ,_("Acronym"), :class=>"formlabel") %> | |
7 | + <%= text_field_tag(:acronym) %> | |
8 | + </div> | |
9 | + | |
10 | + <div class="formfieldline"> | |
11 | + <%= label_tag _("Adherent to e-PING ?") %> | |
12 | + | |
13 | + <%= label_tag "e_ping_true", "Yes" %> | |
14 | + <%= radio_button_tag(:e_ping,true)%> | |
15 | + <%= label_tag "e_ping_false", "No"%> | |
16 | + <%= radio_button_tag(:e_ping,false)%> | |
17 | + </div> | |
18 | + | |
19 | + <div class="formfieldline"> | |
20 | + <%= label_tag _("Adherent to e-MAG ?") %> | |
21 | + | |
22 | + <%= label_tag "e_mag_true", "Yes"%> | |
23 | + <%= radio_button_tag(:e_mag,true)%> | |
24 | + <%= label_tag "e_mag_false", "No"%> | |
25 | + <%= radio_button_tag(:e_mag,false)%> | |
26 | + </div> | |
27 | + | |
28 | + <div class="formfieldline"> | |
29 | + <%= label_tag _("Adherent to ICP-Brasil ?") %> | |
30 | + | |
31 | + <%= label_tag "icp_brasil_true", "Yes"%> | |
32 | + <%= radio_button_tag(:icp_brasil,true)%> | |
33 | + <%= label_tag "icp_brasil_false", "No"%> | |
34 | + <%= radio_button_tag(:icp_brasil,false)%> | |
35 | + </div> | |
36 | + | |
37 | + <div class="formfieldline"> | |
38 | + <%= label_tag _("Adherent to e-ARQ ?") %> | |
39 | + | |
40 | + <%= label_tag "e_arq_true", "Yes"%> | |
41 | + <%= radio_button_tag(:e_arq,true)%> | |
42 | + <%= label_tag "e_arq_false", "No"%> | |
43 | + <%= radio_button_tag(:e_arq,false)%> | |
44 | + </div> | |
45 | + | |
46 | + <div class="formfieldline"> | |
47 | + <%= label_tag _("Internacionalizable ?") %> | |
48 | + | |
49 | + <%= label_tag "intern_true", "Yes" %> | |
50 | + <%= radio_button_tag(:intern,true)%> | |
51 | + <%= label_tag "intern_false", "No"%> | |
52 | + <%= radio_button_tag(:intern,false)%> | |
53 | + <div class="formfieldline"> | |
54 | + <%= label_tag "operating_platform", _("Operating Platform: ") %> <br /> | |
55 | + <%= text_area_tag :operating_platform %> | |
56 | + </div> | |
57 | + | |
58 | + <div class="formfieldline"> | |
59 | + <%= label_tag "objectives", _("Objectives: ")%><br /> | |
60 | + <%= text_area_tag :objectives %> | |
61 | + </div> | |
62 | + | |
63 | + <div class="formfieldline"> | |
64 | + <%= label_tag "features", _("Features: ")%><br /> | |
65 | + <%= text_area_tag :features %> | |
66 | + </div> | |
67 | + | |
68 | + <div id='libraries_fields'> | |
69 | + <h4> <%= _("Libraries") %> </h4> | |
70 | + <% if @list_libraries.blank? %> | |
71 | + <%= LibraryHelper.library_as_tables(nil).call %> | |
72 | + <% else %> | |
73 | + <%= render :partial => 'library_fields', :locals => { :f => f, :object_name => 'community', :profile => @community, :libraries => @list_libraries } %> | |
74 | + <% end %> | |
75 | + </div> | |
76 | + <br /> | |
77 | + | |
78 | + <div id='operating_system_fields'> | |
79 | + <h4> <%= _("Operating Systems") %> </h4> | |
80 | + <% if @list_operating_systems.blank? %> | |
81 | + <%= OperatingSystemHelper.operating_system_as_tables(nil, false).call %> | |
82 | + <% else %> | |
83 | + <%= render :partial => 'operating_system_fields', :locals => {:object_name => 'community', :profile => @community, :operating_systems_fields => @list_operating_systems} %> | |
84 | + <% end %> | |
85 | + </div> | |
86 | + <br /> | |
87 | + | |
88 | + <br /> | |
89 | + <div id='programming_languages_fields'> | |
90 | + <h4> <%= _("Programming languages") %> </h4> | |
91 | + <% if @list_languages.blank? %> | |
92 | + <%= SoftwareLanguageHelper.language_as_tables(nil, false).call %> | |
93 | + <% else %> | |
94 | + <%= render :partial => 'language_fields', :locals => { :object_name => 'community', :profile => @community, :languages => @list_languages } %> | |
95 | + <% end %> | |
96 | + </div> | |
97 | + | |
98 | + <br /> | |
99 | + <div id='database_fields'> | |
100 | + <h4> <%= _("Databases") %> </h4> | |
101 | + <% if @list_databases.blank? %> | |
102 | + <%= DatabaseHelper.database_as_tables(nil, true).call %> | |
103 | + <% else %> | |
104 | + <%= render :partial => 'database_fields', :locals => {:object_name => 'community', :profile => @community, :database => @list_databases } %> | |
105 | + <% end %> | |
106 | + </div> | |
107 | + | |
108 | + <div id="software_categories_fields"> | |
109 | + <h4> <%= _("Software Categories:") %> </h4> | |
110 | + | |
111 | + <%= check_box_tag :administration %> | |
112 | + <%= label_tag :administration, _("Administration") %><br /> | |
113 | + | |
114 | + <%= check_box_tag :agriculture %> | |
115 | + <%= label_tag :agriculture, _("Agriculture") %><br /> | |
116 | + | |
117 | + <%= check_box_tag :business_and_services %> | |
118 | + <%= label_tag :business_and_services, _("Business_and Services") %><br /> | |
119 | + | |
120 | + <%= check_box_tag :communication %> | |
121 | + <%= label_tag :communication, _("Communication") %><br /> | |
122 | + | |
123 | + <%= check_box_tag :culture %> | |
124 | + <%= label_tag :culture, _("Culture") %><br /> | |
125 | + | |
126 | + <%= check_box_tag :national_defense %> | |
127 | + <%= label_tag :national_defense, _("National Defense") %><br /> | |
128 | + | |
129 | + <%= check_box_tag :economy_and_finances %> | |
130 | + <%= label_tag :economy_and_finances, _("Economy and Finances") %><br /> | |
131 | + | |
132 | + <%= check_box_tag :education %> | |
133 | + <%= label_tag :education, _("Education") %><br /> | |
134 | + | |
135 | + <%= check_box_tag :energy %> | |
136 | + <%= label_tag :energy, _("Energy") %><br /> | |
137 | + | |
138 | + <%= check_box_tag :sports %> | |
139 | + <%= label_tag :sports, _("Sports") %><br /> | |
140 | + | |
141 | + <%= check_box_tag :habitation %> | |
142 | + <%= label_tag :habitation, _("Habitation") %><br /> | |
143 | + | |
144 | + <%= check_box_tag :industry %> | |
145 | + <%= label_tag :industry, _("Industry") %><br /> | |
146 | + | |
147 | + <%= check_box_tag :environment %> | |
148 | + <%= label_tag :environment, _("Environment") %><br /> | |
149 | + | |
150 | + <%= check_box_tag :research_and_development %> | |
151 | + <%= label_tag :research_and_development, _("Research and Development") %><br /> | |
152 | + | |
153 | + <%= check_box_tag :social_security %> | |
154 | + <%= label_tag :social_security, _("Social Security") %><br /> | |
155 | + | |
156 | + <%= check_box_tag :social_protection %> | |
157 | + <%= label_tag :social_protection, _("Social Protection") %><br /> | |
158 | + | |
159 | + <%= check_box_tag :sanitation %> | |
160 | + <%= label_tag :sanitation, _("Sanitation") %><br /> | |
161 | + | |
162 | + <%= check_box_tag :health %> | |
163 | + <%= label_tag :health, _("Health") %><br /> | |
164 | + | |
165 | + <%= check_box_tag :security_public_order %> | |
166 | + <%= label_tag :security_public_order, _("Security and Public Order") %><br /> | |
166 | 167 | |
167 | - <%= check_box_tag :work %> | |
168 | - <%= label_tag :work, _("Work") %><br /> | |
168 | + <%= check_box_tag :work %> | |
169 | + <%= label_tag :work, _("Work") %><br /> | |
169 | 170 | |
170 | - <%= check_box_tag :transportation %> | |
171 | - <%= label_tag :transportation, _("Transportation") %><br /> | |
171 | + <%= check_box_tag :transportation %> | |
172 | + <%= label_tag :transportation, _("Transportation") %><br /> | |
172 | 173 | |
173 | - <%= check_box_tag :urbanism %> | |
174 | - <%= label_tag :urbanism, _("Urbanism") %><br /> | |
174 | + <%= check_box_tag :urbanism %> | |
175 | + <%= label_tag :urbanism, _("Urbanism") %><br /> | |
176 | + </div> | |
175 | 177 | </div> |
176 | 178 | -</div> |
179 | +</div> | |
177 | 180 | \ No newline at end of file | ... | ... |