% 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
) %>
<% 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 %>
<% 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| %>
<%end%>
<%= 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')%>
<% 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" %>
<%= t('button.cancel')%>
<% end %>