diff --git a/app/controllers/my_profile/profile_editor_controller.rb b/app/controllers/my_profile/profile_editor_controller.rb
index 2eb3014..b7335ca 100644
--- a/app/controllers/my_profile/profile_editor_controller.rb
+++ b/app/controllers/my_profile/profile_editor_controller.rb
@@ -18,6 +18,7 @@ class ProfileEditorController < MyProfileController
@profile_data = profile
@possible_domains = profile.possible_domains
if request.post?
+ puts "$"*80, params[:profile_data]
params[:profile_data][:fields_privacy] ||= {} if profile.person? && params[:profile_data].is_a?(Hash)
Profile.transaction do
Image.transaction do
diff --git a/plugins/profile_description_block/lib/profile_description_block.rb b/plugins/profile_description_block/lib/profile_description_block.rb
new file mode 100644
index 0000000..70abed1
--- /dev/null
+++ b/plugins/profile_description_block/lib/profile_description_block.rb
@@ -0,0 +1,41 @@
+class ProfileDescriptionBlock < Block
+ settings_items :show_name, :type => :boolean,
+ :default => false
+
+ attr_accessor :show_name
+
+ def self.description
+ _('Profile Description')
+ end
+
+ def help
+ _('this block displays the description field of the profile')
+ end
+
+ def default_title
+ _('PROFILE DESCRIPTION')
+ end
+
+ def content(args={})
+ description = if self.owner.description.blank?
+ "Description field is empty or
+ not enabled on enviroment"
+ else
+ self.owner.description
+ end
+ block = self
+ s = show_name
+ proc do
+ render(
+ :file => 'blocks/profile_description',
+ :locals => { :block => block, :show_name => s ,
+ :description => description}
+ )
+ end
+ end
+
+ def cacheable?
+ false
+ end
+
+end
diff --git a/plugins/profile_description_block/lib/profile_description_block_plugin.rb b/plugins/profile_description_block/lib/profile_description_block_plugin.rb
new file mode 100644
index 0000000..2508974
--- /dev/null
+++ b/plugins/profile_description_block/lib/profile_description_block_plugin.rb
@@ -0,0 +1,24 @@
+class ProfileDescriptionBlockPlugin < Noosfero::Plugin
+
+ def self.plugin_name
+ # FIXME
+ "Profile Description Block"
+ end
+
+ def self.extra_blocks
+ {
+ ProfileDescriptionBlock => { :type => [Community, Person] }
+ }
+ end
+
+
+ def self.plugin_description
+ # FIXME
+ _("A plugin that adds a block that show the profile description")
+ end
+
+ def stylesheet?
+ true
+ end
+
+end
diff --git a/plugins/profile_description_block/public/style.css b/plugins/profile_description_block/public/style.css
new file mode 100644
index 0000000..c7f6fd7
--- /dev/null
+++ b/plugins/profile_description_block/public/style.css
@@ -0,0 +1,10 @@
+#content .box-1 .profile-description-block {
+ display: table;
+ width: 100%;
+}
+
+#content .profile-description-block-title {
+ font-family: arial;
+ font-size: 15px;
+ text-align: left;
+}
diff --git a/plugins/profile_description_block/views/blocks/profile_description.html.erb b/plugins/profile_description_block/views/blocks/profile_description.html.erb
new file mode 100644
index 0000000..6623010
--- /dev/null
+++ b/plugins/profile_description_block/views/blocks/profile_description.html.erb
@@ -0,0 +1,8 @@
+
+
+ <%= block.title %>
+
+
+ <%= description %>
+
+
diff --git a/plugins/profile_fields_block/lib/profile_fields_block.rb b/plugins/profile_fields_block/lib/profile_fields_block.rb
deleted file mode 100644
index 0979f69..0000000
--- a/plugins/profile_fields_block/lib/profile_fields_block.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-class ProfileFieldsBlock < Block
-
- settings_items :profile_description, :type => :string, :default => ""
- settings_items :show_name, :type => :boolean, :default => false
- attr_accessor :show_name
-
-
- def self.description
- _('Profile Fields ')
- end
-
- def profile_description
- self.settings[:profile_description]
- end
-
- def help
- _('This block display the description of the community')
- end
-
- def content(args={})
- self.profile_description = retrive_description_profile_field
- block_content = self.profile_description
- block = self
- s = show_name
- lambda do |object|
- render(
- :file => 'blocks/profile_fields',
- :locals => { :block => block, :show_name => s ,
- :description => block_content}
- )
- end
- end
-
- def cacheable?
- false
- end
-
-
- private
-
- def retrive_description_profile_field
- box_id = self.box_id
- owner_id = Box.find(box_id).owner_id
- description = Profile.find(owner_id).description
- if description.blank?
- "Description field are empty or
- not enabled in enviroment"
- else
- description
- end
- end
-
-end
diff --git a/plugins/profile_fields_block/lib/profile_fields_block_plugin.rb b/plugins/profile_fields_block/lib/profile_fields_block_plugin.rb
deleted file mode 100644
index 62407ad..0000000
--- a/plugins/profile_fields_block/lib/profile_fields_block_plugin.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-class ProfileFieldsBlockPlugin < Noosfero::Plugin
-
- def self.plugin_name
- # FIXME
- "ProfileFieldsBlockPlugin"
- end
-
- def self.extra_blocks
- {
- ProfileFieldsBlock => { :type => [Community] }
- }
- end
-
-
- def self.plugin_description
- # FIXME
- _("A plugin that include a generic block")
- end
-
- def stylesheet?
- true
- end
-
-end
diff --git a/plugins/profile_fields_block/public/style.css b/plugins/profile_fields_block/public/style.css
deleted file mode 100644
index 77aeac3..0000000
--- a/plugins/profile_fields_block/public/style.css
+++ /dev/null
@@ -1,270 +0,0 @@
-.mpog_hidden_field {
- display: none;
-}
-
-#signup-form small#secondary-email-balloon ,
-#signup-form small#area-interest-balloon {
- display: none;
- width: 142px;
- height: 69px;
- color: #FFFFFF;
- font-weight: bold;
- font-size: 11px;
- padding: 5px 10px 45px 10px;
- margin: 0;
- line-height: 1.5em;
- background: transparent url(/images/gray-balloon.png) bottom center no-repeat;
- position: absolute;
- z-index: 2;
- right: -150px;
-}
-
-#signup-form #signup-secondary-email,
-#signup-form #signup-area-interest {
- position: relative;
-}
-
-#signup-form small#secondary-email-balloon,
-#signup-form small#area-interest-balloon {
- top: -80px;
-}
-
-.dynamic-table {
- border: solid 1px #000;
- margin-top: 5px;
- margin-bottom: 15px;
-}
-.dynamic-table td, .dynamic-table tr {
- border: none;
-}
-.dynamic-table input {
- width: 220px;
-}
-
-.mpog-incomplete-percentage img {
- margin-left: 5px;
-}
-
-.mpog-incomplete-percentage img:hover {
- cursor: pointer;
-}
-
-#institution_dialog {
- display: none;
-}
-
-.errorExplanation {
- color: red;
- margin-left: 10px;
-}
-
-.hide-field {
- display: none !important;
-}
-
-.show-field {
- display: block !important;
-}
-
-#user_filter_content {
- display: block;
- width: 100%;
- height: auto;
-}
-
-.mpog_search_form_fields {
- margin-top: 10px;
- width: 80%;
- height: auto;
- position: relative;
- float: left;
-}
-
-.mpog_search_form_button {
- margin-top: 10px;
-}
-
-.mpog_search_form_fields input[type='text'] {
- width: 90%;
-
-}
-
-.mpog_search_form_table tr td:first-child {
- width: 22%;
-}
-
-.formfieldline {
- margin-top: 10px;
-}
-.formfieldline input[type="text"] {
- width: 180px;
-}
-
-#complete_registration {
- padding: 5px;
- width: 100%;
- background-color: #fff;
-}
-
-#complete_registration a {
- text-decoration: none;
-}
-
-#complete_registration a:hover {
- font-weight: bold;
-}
-
-#complete_registration_percentage {
- width: 100%;
- height: 20px;
- background: #fff;
- border: solid 1px #000;
-}
-
-#profile-data .invalid {
- border-color: rgb(127, 0, 0);
- box-shadow: 0px 0px 7px red;
-}
-
-#profile-data .validated {
- box-shadow: 0px 0px 7px green;
- border-color: rgb(0, 80, 0)
-}
-
-#software-name-field
-{
- padding-bottom: 10px;
-}
-
-#software-hostname
-{
- float: left;
- display: inline-block;
- vertical-align: middle;
-
- background: #EEE;
- border: 1px solid #CFCFCF;
-
- line-height: 22px;
- padding: 0px 7px;
- color: #4A4A4A;
- font-size: 20px;
- text-transform: lowercase;
- min-width: 190px;
- border-spacing: 20px;
-}
-
-.mandatory::after
-{
- color: red;
- content: ' (*)'
-}
-
-.autocomplete_validation_message {
- color: red;
-}
-
-
-#content .institutions-block ul,
-#content .softwares-block ul {
- min-width: 196px;
- width: 192px;
- margin: 0px 0px 0px -3px;
- padding: 0px;
-}
-
-#content .box-1 .institutions-block ul,
-#content .box-1 .softwares-block ul {
- width: auto;
- display: block;
-}
-
-#content .institutions-block .block-footer-content a,
-#content .softwares-block .block-footer-content a {
- position: absolute;
- top: 2px;
- right: 0px;
- font-size: 11px;
- color: #000;
- text-decoration: none;
- padding-right: 15px;
-}
-
-#content .institutions-block .block-footer-content a,
-#content .lock-footer-content a {
- background: url(../../../designs/themes/base/imgs/arrow-right-p.png) 100% 50% no-repeat;
-}
-
-.improve_input_size {
- width: 315px !important;
-}
-
-.search-community-content-block span {
- width: auto;
-}
-
-#catalog-list ul li {
- display: inline;
- margin-right: 5px;
- font-size: 14px;
- padding: 5px;
- }
-
-#catalog-list ul li span {
- cursor: pointer;
- margin-left: 5px;
-}
-
-.catalog-remove-item {
- padding: 3px;
- border: solid 1px #999;
- border-radius: 3px;
-}
-
-.category_box {
- font-size: 11px;
- border:1px solid #e9e8ed;
- border-radius:8px;
- background-color:#e9e8ed;
- padding:3px 6px;
- margin: 10px 3px;
- color: blue;
-}
-
-.search-results-type-software_info li {
- width: 100% !important;
- display: block !important;
-}
-
-/* Start software block main area definitions */
-.software-block {
- position: relative;
- float: left;
- margin: 0px 10px 10px 0px;
- width: 30%;
- height: 200px;
- word-wrap: break-word;
- overflow: hidden;
-}
-
-.software-block-logo {
- width: 150px;
- height: 150px;
- margin: 0px auto;
-}
-
-.software-block-content, .software-block-finality {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0px;
- left: 0px;
-}
-
-.software-block-finality {
- background-color: #fff;
- top: 100%;
- display: block;
- background-color:rgba(255, 255, 255, 0.9);
-}
-/* End software block main area definitions */
diff --git a/plugins/profile_fields_block/views/blocks/profile_fields.html.erb b/plugins/profile_fields_block/views/blocks/profile_fields.html.erb
deleted file mode 100644
index 42fadff..0000000
--- a/plugins/profile_fields_block/views/blocks/profile_fields.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<%= block.title %>
-
-
--
libgit2 0.21.2