<% toolbar :profile => current_subject %> <% sidebar %> <%if params[:section].present? case params[:section] when "about_me" level2 = link_to( t('profile.' + current_subject.class.to_s.downcase + '.info'), :controller => :profiles , :action => :edit, :section => "about_me") when "contact_info" level2 = link_to(t('profile.contact'), :controller => :profiles , :action => :edit, :section => "contact_info") when "my_experience" level2 = link_to(t('profile.' + current_subject.class.to_s.downcase + '.experience'), :controller => :profiles , :action => :edit, :section => "my_experience") when "tags" level2 = link_to(t('profile.' + current_subject.class.to_s.downcase + '.tags'), :controller => :profiles , :action => :edit, :section => "tags") end else level2 = link_to(t('profile.one'), :controller => :profiles , :action => :edit) end %> <%= location( link_to(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 :javascript do %> $(function() { $(".new_group").validate({errorClass: "validation_error"}); }); $("#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 %>

<%=t('profile.tags.other')%>

<%= f.fields_for :actor do |actor_form| %>
<%= actor_form.select :tag_list, [], :class => "form_tag" %>
<%end%>
<% end %> <% if !params[:section].present? or params[:section].eql?("about_me") %>

<%=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')%>
<%= date_select "profile", "birthday", :order => [:day, :month, :year], :end_year=> Date.today.year, :start_year=> (Date.today.year - 100), :prompt => { :day => 'Day', :month => 'Month', :year => 'Year' } %>
<%= 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" %>
<%=t('required')%>
<% end %> <% if !params[:section].present? or params[:section].eql?("contact_info") %>

<%=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.fields_for :actor do |actor_form| %>
<%= actor_form.label t('profile.email')%>
<%= actor_form.text_field :email, :class => "email form_tag" %>
<%end%>
<%= f.label t('profile.website')%>
<%= f.text_field :website, :class => "url form_tag" %>
<% end %> <% if !params[:section].present? or params[:section].eql?("my_experience") %>

<%=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 %>