<%= render :partial => 'help' %>
<% form_tag :action => 'update' do %> <% def table_row(pref_name, nowrap_label = false, &block) nowrap_attribute = nowrap_label ? ' nowrap="nowrap"' : '' s = %Q|\n\n" s end def row_with_select_field(pref_name, collection = [ [t('preferences.is_true'),true], [t('preferences.is_false'), false] ], nowrap_label = false) table_row(pref_name, nowrap_label) { select('prefs', pref_name, collection) } end def row_with_text_field(pref_name, nowrap_label = false) table_row(pref_name, nowrap_label) { text_field('prefs', pref_name) } end %> <%= row_with_select_field('locale', I18n.available_locales.map {|l| l.to_s}) %> <%= row_with_text_field('date_format') %> <%= row_with_text_field('title_date_format') %> <%= table_row('time_zone', false) { time_zone_select('prefs','time_zone') } %> <%= row_with_select_field("week_starts", (0..6).to_a.map {|num| [t('date.day_names')[num], num] }) %> <%= row_with_select_field("due_style", [[t('models.preference.due_styles')[0],Preference.due_styles[:due_in_n_days]],[t('models.preference.due_styles')[1],Preference.due_styles[:due_on]]]) %> <%= row_with_select_field("show_completed_projects_in_sidebar") %> <%= row_with_select_field("show_hidden_projects_in_sidebar") %> <%= row_with_select_field("show_hidden_contexts_in_sidebar") %> <%= row_with_select_field("show_project_on_todo_done") %> <% if current_user.is_admin? %> <%= row_with_text_field('admin_email') %> <% end %> <%= row_with_text_field('staleness_starts', false) %> <%= row_with_text_field('show_number_completed') %> <%= row_with_text_field('refresh') %> <%= row_with_select_field("verbose_action_descriptors") %> <%= row_with_text_field("mobile_todos_per_page") %> <%= row_with_text_field("sms_email") %> <%= table_row("sms_context", false) { select('prefs', 'sms_context_id', current_user.contexts.map{|c| [c.name, c.id]}) } %>
<%= text_field 'user', 'first_name' %>
<%= text_field 'user', 'last_name' %>
\n| s << yield s << "\n
<%= submit_tag t('common.update') %> <%= link_to t('common.cancel'), :action => 'index' %>
<% end %>