<% toolbar :profile => current_subject %> <% content_for :sidebar do %> <%= render :partial => "#{ current_subject.class.to_s.tableize }/sidebar_index" %> <% end %> <% content_for :headers do %> <%= stylesheet_link_tag "jquery-ui", :media => "screen, projection" %> <%= javascript_include_tag 'jquery.validate' %> <% end %> <% content_for :javascript do %> $(function() { $(".edit_profile").validate(); }); <% end %> <%if params[:section].present? case params[:section] when "about_me" level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.' + current_subject.class.to_s.downcase + '.info'), :controller => :profiles , :action => :edit, :section => "about_me") when "contact_info" level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.contact'), :controller => :profiles , :action => :edit, :section => "contact_info") when "my_experience" level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.' + current_subject.class.to_s.downcase + '.experience'), :controller => :profiles , :action => :edit, :section => "my_experience") when "tags" level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.' + current_subject.class.to_s.downcase + '.tags'), :controller => :profiles , :action => :edit, :section => "tags") end else level2 = link_to(image_tag("btn/edit.png", :class => "menu_icon")+t('profile.one'), :controller => :profiles , :action => :edit) end %> <%= location( link_to(image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'), [current_subject, :profile]), level2 ) %>
<%= form_for(@profile, :url => [current_subject, :profile], :remote => true) do |f| %>
<% if !params[:section].present? or params[:section].eql?("tags") %> <% content_for :headers do %> <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %> <%= javascript_include_tag 'jquery.fcbkcomplete.min', 'jquery.validate' %> <% end %> <% content_for :javascript do %> $(function() { $(".new_group").validate(); }); $("#profile_actor_attributes_tag_list").fcbkcomplete({ json_url: "<%= tags_path(:format => :json) %>", cache: false, filter_case: true, filter_hide: true, newel: false, height: 6 }); <% @profile.subject.tag_list.each do |tag| %> $("#profile_actor_attributes_tag_list").trigger("addItem",{"title":"<%= tag %>","value":"<%= tag %>"}); <% end %> <% end %>
<%= f.fields_for :actor do |actor_form| %>
<%= f.label t(current_subject.class.to_s.downcase + '.tags') %>
<%= actor_form.select :tag_list, [], :class => "form_tag" %>
<%end%>
<% end %> <% if !params[:section].present? or params[:section].eql?("about_me") %> <% content_for :javascript do %> $(function () { $( "#profile_birthday" ).datepicker({ yearRange: '1900:<%= Time.now.utc.to_date.year%>', changeYear: true, maxDate: '+0d', defaultDate: '-30y'}); $("#personal_info").addClass('section_highlight'); }); <% end %>

<%=t('profile.' + current_subject.class.to_s.downcase + '.info')%>

<%= f.fields_for :actor do |actor_form| %>
<%= f.label t('actor.name') %>
<%= actor_form.text_field :name, :class => "required form_tag" %>
<%end%>
<%= f.label t('profile.organization')%>
<%= f.text_field :organization , :class => "form_tag" %>
<%= f.label t('profile.' + current_subject.class.to_s.downcase + '.birthday')%>
<%= f.text_field( :birthday , :class => "date form_tag") %>
<%= f.label t('profile.actualcity')%>
<%= f.text_field :city, :class => "form_tag" %>
<%= f.label t('profile.country') %>
<%= f.text_field :country, :class => "form_tag" %>
<%= f.label t('profile.' + current_subject.class.to_s.downcase + '.about') %>
<%= f.text_area :description, :maxlength => 200, :rows => 10, :class => "form_tag_long" %>
<% end %> <% if !params[:section].present? or params[:section].eql?("contact_info") %> <% content_for :javascript do %> $(function() { $("#contact_info").addClass('section_highlight'); }); <% end %>

<%=t('profile.contact')%>

<%= f.label t('profile.phone')%>
<%= f.text_field :phone, :class => "phone form_tag" %>
<%= f.label t('profile.mobile') %>
<%= f.text_field :mobile, :class => "phone form_tag" %>
<%= f.label t('profile.fax') %>
<%= f.text_field :fax, :class => "phone form_tag" %>
<%= f.label t('profile.address') %>
<%= f.text_field :address, :class => "form_tag" %>
<%= f.label t('profile.website')%>
<%= f.text_field :website, :class => "url form_tag" %>
<% end %> <% if !params[:section].present? or params[:section].eql?("my_experience") %> <% content_for :javascript do %> $(function() { $("#experience_info").addClass('section_highlight'); }); <% end %>

<%=t('profile.' + current_subject.class.to_s.downcase + '.experience')%>

<%= f.text_area :experience, :maxlength => 500, :rows => 10, :class => "form_tag_long" %>
<% end %> <% if params[:section].present? %> <%= hidden_field_tag("section", params[:section]) %> <% end %>
<%= f.submit t('button.update'), :class => "button" %> 
<% end %>