diff --git a/app/assets/javascripts/tracks.js b/app/assets/javascripts/tracks.js index 3aed5f5f..b139a52e 100644 --- a/app/assets/javascripts/tracks.js +++ b/app/assets/javascripts/tracks.js @@ -726,7 +726,7 @@ var ProjectListPage = { var highlight = function(){ $('h2#project_name').effect('highlight', {}, 500); }; - $.post(relative_to_root('projects/update/'+project_id), { + $.post(relative_to_root('projects/'+project_id), { 'project[name]': value, 'update_project_name': 'true', '_method': 'put' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 43207dc1..152f68d2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -84,7 +84,7 @@ class ApplicationController < ActionController::Base return "#{deferred_count.to_s} #{word}".html_safe else word = I18n.t('common.actions_midsentence', :count => count) - return "#{count.to_s} #{word}".html_safe + return "#{count} #{word}".html_safe end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 68308b0d..44b7609c 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -18,17 +18,17 @@ module ProjectsHelper end def project_next_prev - html = '' - unless @previous_project.nil? + html = "" + if @previous_project project_name = truncate(@previous_project.name, :length => 40, :omission => "...") - html << link_to_project(@previous_project, "« #{project_name}") + html << link_to_project(@previous_project, "« #{project_name}".html_safe) end - html << ' | ' if @previous_project && @next_project - unless @next_project.nil? + html << " | " if @previous_project && @next_project + if @next_project project_name = truncate(@next_project.name, :length => 40, :omission => "...") - html << link_to_project(@next_project, "#{project_name} »") + html << link_to_project(@next_project, "#{project_name} »".html_safe) end - html + html.html_safe end def project_next_prev_mobile diff --git a/app/views/notes/create.js.erb b/app/views/notes/create.js.erb index 4ae69b50..d3289c62 100644 --- a/app/views/notes/create.js.erb +++ b/app/views/notes/create.js.erb @@ -17,7 +17,7 @@ function clear_form() { } function html_for_error_messages() { - return "<%= escape_javascript(error_messages_for('project')) %>"; + return "<%= escape_javascript(get_list_of_error_messages_for(@note)) %>"; } function html_for_note_summary() { diff --git a/app/views/projects/_project_form.html.erb b/app/views/projects/_project_form.html.erb index 8673994b..f1910893 100644 --- a/app/views/projects/_project_form.html.erb +++ b/app/views/projects/_project_form.html.erb @@ -2,7 +2,7 @@ project = project_form %> -<% form_for(project, :html => { +<%= form_for(project, :html => { :id => dom_id(project, 'edit_form'), :class => "inline-form edit-project-form", :method => :put }) do diff --git a/app/views/projects/_project_listing.html.erb b/app/views/projects/_project_listing.html.erb index a572806d..c4371c00 100644 --- a/app/views/projects/_project_listing.html.erb +++ b/app/views/projects/_project_listing.html.erb @@ -12,7 +12,7 @@ suppress_delete_button ||= false
<%= link_to_project( project ) %> - <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %> + <%= " (#{count_undone_todos_and_notes_phrase(project)})".html_safe %>