封掉所有列表入口,及页面中更多入口
This commit is contained in:
parent
972b788687
commit
e4e4c94d53
|
@ -37,6 +37,7 @@ class ContestsController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
render_404
|
||||||
# @contests = Contest.visible
|
# @contests = Contest.visible
|
||||||
# @contests ||= []
|
# @contests ||= []
|
||||||
@offset, @limit = api_offset_and_limit(:limit => 10)
|
@offset, @limit = api_offset_and_limit(:limit => 10)
|
||||||
|
|
|
@ -427,6 +427,7 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
render_404
|
||||||
@course_type = params[:course_type]
|
@course_type = params[:course_type]
|
||||||
@school_id = params[:school_id]
|
@school_id = params[:school_id]
|
||||||
per_page_option = 10
|
per_page_option = 10
|
||||||
|
@ -474,7 +475,7 @@ class CoursesController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
render :layout => 'base'
|
# render :layout => 'base'
|
||||||
}
|
}
|
||||||
format.atom {
|
format.atom {
|
||||||
courses = Course.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all
|
courses = Course.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all
|
||||||
|
|
|
@ -105,6 +105,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
render_404
|
||||||
#调用存储过程更新提交次数
|
#调用存储过程更新提交次数
|
||||||
#ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
|
#ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
|
||||||
#Modified by nie
|
#Modified by nie
|
||||||
|
@ -157,7 +158,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
render :layout => 'base'
|
# render :layout => 'base'
|
||||||
# scope = Project
|
# scope = Project
|
||||||
# unless params[:closed]
|
# unless params[:closed]
|
||||||
# scope = scope.active
|
# scope = scope.active
|
||||||
|
|
|
@ -295,6 +295,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
#end
|
#end
|
||||||
def index
|
def index
|
||||||
|
|
||||||
@status = params[:status] || 1
|
@status = params[:status] || 1
|
||||||
sort_init 'login', 'asc'
|
sort_init 'login', 'asc'
|
||||||
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
||||||
|
@ -352,7 +353,8 @@ class UsersController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
@groups = Group.all.sort
|
@groups = Group.all.sort
|
||||||
render :layout => @user_base_tag
|
# render :layout => @user_base_tag
|
||||||
|
render_404
|
||||||
}
|
}
|
||||||
format.api
|
format.api
|
||||||
end
|
end
|
||||||
|
|
|
@ -1830,12 +1830,11 @@ module ApplicationHelper
|
||||||
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
|
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}
|
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}
|
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'}
|
# 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}
|
|
||||||
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain}
|
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'}
|
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"}
|
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'}
|
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'}
|
||||||
|
@ -1844,7 +1843,7 @@ module ApplicationHelper
|
||||||
#@nav_dispaly_project_label
|
#@nav_dispaly_project_label
|
||||||
nav_list = Array.new
|
nav_list = Array.new
|
||||||
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
|
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(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
|
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(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(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(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(bids_link) if @nav_dispaly_bid_label
|
||||||
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
||||||
nav_list.push(stores_link) if @nav_dispaly_store_all_label
|
nav_list.push(stores_link) if @nav_dispaly_store_all_label
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<td>
|
<td>
|
||||||
<p class="top-content-list">
|
<p class="top-content-list">
|
||||||
<%= link_to "主页", home_path %>
|
<%= 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 %>
|
> <%= link_to @course.name, nil %>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td>
|
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -114,7 +114,6 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%=link_to "主页", home_path %> >
|
<%=link_to "主页", home_path %> >
|
||||||
<%=link_to "软件创客", :controller => 'users', :action => 'index' %> >
|
|
||||||
<span><%=link_to @user.name, user_path %></span>
|
<span><%=link_to @user.name, user_path %></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -7,5 +7,3 @@
|
||||||
<%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %>
|
<%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to l(:label_more), {:controller => 'courses', :action => 'index', :school_id => school_id} %>
|
|
|
@ -160,8 +160,6 @@
|
||||||
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %>
|
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to l(:label_more), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
|
|
||||||
</span>
|
</span>
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<div class="d-p-projectlist">
|
<div class="d-p-projectlist">
|
||||||
|
@ -258,7 +256,6 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-left">
|
<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>
|
<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">
|
<div class="d-p-projectlist-box">
|
||||||
<% if Softapplication.count > 0%>
|
<% if Softapplication.count > 0%>
|
||||||
<div class="d-p-projectlist">
|
<div class="d-p-projectlist">
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<% @nav_dispaly_project_label = 1
|
<% @nav_dispaly_forum_label = 1 %>
|
||||||
@nav_dispaly_forum_label = 1 %>
|
|
||||||
<%= stylesheet_link_tag 'welcome' %>
|
<%= stylesheet_link_tag 'welcome' %>
|
||||||
<%= javascript_include_tag 'welcome' %>
|
<%= javascript_include_tag 'welcome' %>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
|
@ -68,12 +67,6 @@
|
||||||
:project_type =>( @project_type||=0)},
|
:project_type =>( @project_type||=0)},
|
||||||
:class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
:class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to l(:label_more), { :controller => 'projects',
|
|
||||||
:action => 'index',
|
|
||||||
:project_type => 0,
|
|
||||||
:host => Setting.project_domain},
|
|
||||||
:target => "_blank" %>
|
|
||||||
</span>
|
</span>
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
|
@ -118,9 +111,6 @@
|
||||||
<%= l(:lable_user_active)%>
|
<%= l(:lable_user_active)%>
|
||||||
</strong>
|
</strong>
|
||||||
</h3>
|
</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;">
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||||
<%activities = find_all_activities%>
|
<%activities = find_all_activities%>
|
||||||
<% activities.each do |event| %>
|
<% activities.each do |event| %>
|
||||||
|
|
Loading…
Reference in New Issue