封掉所有列表入口,及页面中更多入口

This commit is contained in:
moon 2014-11-21 16:59:58 +08:00
parent 972b788687
commit e4e4c94d53
11 changed files with 19 additions and 31 deletions

View File

@ -37,6 +37,7 @@ class ContestsController < ApplicationController
def index
render_404
# @contests = Contest.visible
# @contests ||= []
@offset, @limit = api_offset_and_limit(:limit => 10)

View File

@ -427,6 +427,7 @@ class CoursesController < ApplicationController
end
def index
render_404
@course_type = params[:course_type]
@school_id = params[:school_id]
per_page_option = 10
@ -474,7 +475,7 @@ class CoursesController < ApplicationController
respond_to do |format|
format.html {
render :layout => 'base'
# render :layout => 'base'
}
format.atom {
courses = Course.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all

View File

@ -105,6 +105,7 @@ class ProjectsController < ApplicationController
end
def index
render_404
#调用存储过程更新提交次数
#ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
#Modified by nie
@ -156,8 +157,8 @@ class ProjectsController < ApplicationController
respond_to do |format|
format.html {
render :layout => 'base'
format.html {
# render :layout => 'base'
# scope = Project
# unless params[:closed]
# scope = scope.active

View File

@ -295,6 +295,7 @@ class UsersController < ApplicationController
#end
def index
@status = params[:status] || 1
sort_init 'login', 'asc'
sort_update %w(login firstname lastname mail admin created_on last_login_on)
@ -352,7 +353,8 @@ class UsersController < ApplicationController
respond_to do |format|
format.html {
@groups = Group.all.sort
render :layout => @user_base_tag
# render :layout => @user_base_tag
render_404
}
format.api
end

View File

@ -1830,12 +1830,11 @@ module ApplicationHelper
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.contest_domain}
course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'}
# course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'}
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain}
courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'}
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}
# courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'}
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain}
contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'}
# contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'}
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'}
@ -1844,7 +1843,7 @@ module ApplicationHelper
#@nav_dispaly_project_label
nav_list = Array.new
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
# nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1
nav_list.push(main_project_link) if @nav_dispaly_main_project_label
@ -1852,9 +1851,9 @@ module ApplicationHelper
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
nav_list.push(projects_link) if @nav_dispaly_project_label
# nav_list.push(projects_link) if @nav_dispaly_project_label
nav_list.push(users_link) if @nav_dispaly_user_label
nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
# nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
nav_list.push(bids_link) if @nav_dispaly_bid_label
nav_list.push(forum_link) if @nav_dispaly_forum_label
nav_list.push(stores_link) if @nav_dispaly_store_all_label

View File

@ -56,7 +56,7 @@
<td>
<p class="top-content-list">
<%= link_to "主页", home_path %>
> <%= link_to l(:label_course_all), :controller => 'courses', :action => 'index' %>
> <a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
> <%= link_to @course.name, nil %>
</p>
</td>

View File

@ -44,7 +44,7 @@
</tr>
<tr>
<td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to l(:label_project_deposit),:controller => 'projects', :action => 'index', :project_type => 0 %> > <%=link_to @project, project_path(@project) %></p></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to @project, project_path(@project) %></p></td>
</tr>
</table>
</div>

View File

@ -113,8 +113,7 @@
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
</td>
<td>
<%=link_to "主页", home_path %> >
<%=link_to "软件创客", :controller => 'users', :action => 'index' %> >
<%=link_to "主页", home_path %> >
<span><%=link_to @user.name, user_path %></span>
</td>
</tr>

View File

@ -7,5 +7,3 @@
<%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %>
&nbsp;&nbsp;&nbsp;&nbsp;
<% end %>
<%= link_to l(:label_more), {:controller => 'courses', :action => 'index', :school_id => school_id} %>

View File

@ -160,8 +160,6 @@
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %>
<% end %>
<% end %>
&nbsp;&nbsp;
<%= link_to l(:label_more), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
</span>
<div class="d-p-projectlist-box">
<div class="d-p-projectlist">
@ -258,7 +256,6 @@
<div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'softapplications', :action => 'index'}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">
<% if Softapplication.count > 0%>
<div class="d-p-projectlist">

View File

@ -1,5 +1,4 @@
<% @nav_dispaly_project_label = 1
@nav_dispaly_forum_label = 1 %>
<% @nav_dispaly_forum_label = 1 %>
<%= stylesheet_link_tag 'welcome' %>
<%= javascript_include_tag 'welcome' %>
<script type="text/javascript" language="javascript">
@ -68,12 +67,6 @@
:project_type =>( @project_type||=0)},
:class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %>
&nbsp;&nbsp;
<%= link_to l(:label_more), { :controller => 'projects',
:action => 'index',
:project_type => 0,
:host => Setting.project_domain},
:target => "_blank" %>
</span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
@ -118,9 +111,6 @@
<%= l(:lable_user_active)%>
</strong>
</h3>
<span style="margin-top: -20px;float: right; display: block;">
<%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %>
</span>
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% activities.each do |event| %>