diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 75b87c6f0..3c815c7d8 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -56,6 +56,8 @@ class AttachmentsController < ApplicationController } format.api end + rescue Encoding::InvalidByteSequenceError => e + render :action => 'file' end def download diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2ba16c742..799316c47 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -460,6 +460,7 @@ module ApplicationHelper project_tree(projects) do |project, level| name_prefix = (level > 0 ? ' ' * 2 * level + '» ' : '').html_safe tag_options = {:value => project.id} + tag_options[:title] = project.name if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project)) tag_options[:selected] = 'selected' else @@ -1836,11 +1837,8 @@ module ApplicationHelper bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} - - school_all_school_link = link_to l(:label_school_all), {:controller => 'school', :action => 'index'} - #@nav_dispaly_project_label nav_list = Array.new nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1 diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 99b21d8cc..1afb94220 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -219,7 +219,7 @@ module CoursesHelper def render_course_hierarchy(courses) render_course_nested_lists(courses) do |course| - s = link_to_course(course, {}, :class => "#{course.css_classes} #{User.current.member_of?(course) ? 'my-course' : nil}").html_safe + s = link_to_course(course, {}, :class => "#{course.css_classes} #{User.current.member_of_course?(course) ? 'my-course' : nil}").html_safe s end end diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 9298c253c..abcbbfe5b 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -15,7 +15,7 @@ <%= l(:label_private) %> <% end %> - <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%> + <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info #{User.current.member_of_course?(@course) ? 'my-project' : nil}"))%>
<%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%> diff --git a/app/views/courses/join_private_courses.js.erb b/app/views/courses/join_private_courses.js.erb index 7bbb5ee99..0cf723f6b 100644 --- a/app/views/courses/join_private_courses.js.erb +++ b/app/views/courses/join_private_courses.js.erb @@ -1,4 +1,3 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>'); showModal('ajax-modal', '510px'); -$('#ajax-modal').addClass('new-watcher'); $('#ajax-modal').css('height','330px'); \ No newline at end of file diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 9d6d9f2b3..fcf54de75 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -54,7 +54,7 @@ if (textStatus == 'success') { eval(xhr.responseText); } else if (textStatus == 'error') { - alert('error'); +// alert('error'); } } diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index e121098f4..017a9a03c 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -51,7 +51,7 @@ style="word-break: break-all;word-wrap: break-word;"> <%= label_tag l(:field_subject) %>: <%=h @memo.subject %> -
<% if @memo.attachments.any?%> @@ -149,8 +149,17 @@ \ No newline at end of file diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index df7a1310b..57eaa93d1 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -14,9 +14,14 @@
- - <%= link_to l(:label_all_schol),school_index_path %> - <% if User.current.logged? %> - <%= l(:label_my_school) %> - <% end %> -
-+ <%= link_to l(:label_all_schol),school_index_path %> + <% if User.current.logged? %> + + <%= l(:label_my_school) %> + + <% end %> +
+