1、代码优化。2、很多页面标题不正确问题

This commit is contained in:
z9hang 2014-10-16 15:07:36 +08:00
parent 57776d67c5
commit 258967263e
14 changed files with 19 additions and 12 deletions

View File

@ -225,7 +225,8 @@ class BidsController < ApplicationController
respond_to do |format| respond_to do |format|
layout_file = '' layout_file = ''
case @bid.reward_type case @bid.reward_type
when 3 when 3
html_title(l(:label_question_student))
layout_file = 'base_homework' layout_file = 'base_homework'
when 1 when 1
layout_file = 'base_bids' layout_file = 'base_bids'
@ -523,6 +524,7 @@ class BidsController < ApplicationController
respond_to do |format| respond_to do |format|
if @bid.reward_type == 3 if @bid.reward_type == 3
format.html { format.html {
html_title(l(:label_homework_info))
render :layout => 'base_homework' render :layout => 'base_homework'
} }
elsif @bid.reward_type == 1 elsif @bid.reward_type == 1

View File

@ -9,4 +9,5 @@
<%= submit_tag l(:button_create) %> <%= submit_tag l(:button_create) %>
<%= javascript_tag "$('#bid_name').focus();" %> <%= javascript_tag "$('#bid_name').focus();" %>
<% end %> <% end %>
</div> </div>
<% html_title(l(:label_newtype_contest)) -%>

View File

@ -312,4 +312,4 @@
<div class="pagination"> <div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %> <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
</div> </div>
<% html_title(l(:label_contest_joincontest)) -%>

View File

@ -44,4 +44,4 @@
<%= pagination_links_full @feedback_pages %> <%= pagination_links_full @feedback_pages %>
</ul> </ul>
</div> </div>
<% html_title(l(:label_user_response)) -%>

View File

@ -102,4 +102,5 @@ function checkMaxLength() {
<ul> <ul>
<%= pagination_links_full @feedback_pages %> <%= pagination_links_full @feedback_pages %>
</ul> </ul>
</div> </div>
<% html_title(l(:label_course_feedback)) -%>

View File

@ -57,3 +57,4 @@ function showSubH(/* ... */){
} }
</script> </script>
<% html_title(l(:label_homework)) -%>

View File

@ -119,6 +119,6 @@
<%= pagination_links_full @events_pages %> <%= pagination_links_full @events_pages %>
</ul> </ul>
</div> </div>
<% html_title(l(:label_course_overview)) -%>

View File

@ -69,5 +69,4 @@
<div id="all_browse_div" class="all_browse_div"> <div id="all_browse_div" class="all_browse_div">
<%= render :partial => 'course_show_all_attachment' %> <%= render :partial => 'course_show_all_attachment' %>
</div> </div>
<% html_title(l(:label_course_file)) -%>
<% html_title(l(:label_attachment_plural)) -%>

View File

@ -8,7 +8,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="description" content="<%= Redmine::Info.app_name %>" /> <meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" /> <meta name="keywords" content="issue,bug,tracker" />
<title><%=h l(:label_active_homework) << " - Trustie" %></title> <title><%=h html_title %></title>
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
<%= favicon %> <%= favicon %>

View File

@ -480,3 +480,4 @@
}); });
}); });
</script> </script>
<% html_title(l(:label_activity)) -%>

View File

@ -30,4 +30,5 @@ $(document).ready(function() {
}) })
}); });
}); });
</script> </script>
<% html_title(l(:label_user_course)) -%>

View File

@ -15,4 +15,4 @@
</ul> </ul>
</div> </div>
</div> </div>
<% html_title(l(:label_responses)) -%>

View File

@ -63,3 +63,4 @@
$('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; }); $('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; });
}); });
</script> </script>
<% html_title(l(:label_user_project)) -%>

View File

@ -580,7 +580,7 @@ RedmineApp::Application.routes.draw do
match 'permissions', :via => [:get, :post] match 'permissions', :via => [:get, :post]
end end
end end
resources :web_footer_companies, :only => [:index, :new, :edit, :create,:update,:destroy] resources :web_footer_companies, :except => :show
resources :enumerations, :except => :show resources :enumerations, :except => :show
match 'enumerations/:type', :to => 'enumerations#index', :via => :get match 'enumerations/:type', :to => 'enumerations#index', :via => :get