Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
5cd1ca8dcb
|
@ -0,0 +1,6 @@
|
|||
class OrganizationsController < ApplicationController
|
||||
layout 'project_base'
|
||||
def index
|
||||
@projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)")
|
||||
end
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
class OriginizationsController < ApplicationController
|
||||
layout 'project_base'
|
||||
def index
|
||||
@enterprises = Project.find_by_sql("select distinct(enterprise_name) from projects")
|
||||
end
|
||||
end
|
|
@ -25,15 +25,15 @@ class WelcomeController < ApplicationController
|
|||
before_filter :entry_select, :only => [:index]
|
||||
|
||||
def index
|
||||
unless params[:originization].nil?
|
||||
@originization = params[:originization]
|
||||
@originization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @originization])
|
||||
@e_count = @originization_projects.count
|
||||
if @e_count < 10
|
||||
part_count = 10 -@e_count
|
||||
unless params[:project].nil?
|
||||
@cur_projects = Project.find(params[:project])
|
||||
@organization = @cur_projects.enterprise_name
|
||||
@organization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @organization])
|
||||
@e_count = @organization_projects.count
|
||||
if @e_count < 9
|
||||
part_count = 9 - @e_count
|
||||
# @part_projects = find_all_hot_project part_count, order
|
||||
@part_projects = find_miracle_project(part_count, 3,"score desc")
|
||||
limit = 10 - @e_count
|
||||
end
|
||||
end
|
||||
if @first_page.nil? || @first_page.sort_type.nil?
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<title><%= l(:label_all_enterprises) %></title>
|
||||
<div class="content_syqy">
|
||||
<div class="list"><%= l(:label_all_enterprises) %></div>
|
||||
<div class="syqy_box">
|
||||
<% if @projects.count == 0 %>
|
||||
<h3><%= l(:label_enterprise_nil) %></h3>
|
||||
<% else %>
|
||||
<% @projects.each do |project| %>
|
||||
<% unless project.enterprise_name.blank? %>
|
||||
<ul>
|
||||
<li ><img src="/images/organization_logo.jpg" width="30" height="30" alt="#{project.enterprise_name}" />
|
||||
<a style="padding-top: 2px"><%= link_to project.enterprise_name, home_path(:project => project) %></a></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div class="school-index">
|
||||
<ul id="schoollist" style="line-height: 25px"></ul>
|
||||
</div>
|
||||
<% html_title(l(:label_enterprise_all)) -%>
|
|
@ -1,25 +0,0 @@
|
|||
<div class="enterprise_all">
|
||||
<p>
|
||||
<%= link_to l(:label_all_enterprises) %>
|
||||
<p>
|
||||
<p>
|
||||
<% if @enterprises.count == 0 %>
|
||||
<h3><%= l(:label_enterprise_nil) %></h3>
|
||||
<% else %>
|
||||
<% @enterprises.each do |enterprise| %>
|
||||
<% unless enterprise.enterprise_name.blank? %>
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to enterprise.enterprise_name, home_path(:originization => enterprise.enterprise_name) %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div class="school-index">
|
||||
<ul id="schoollist" style="line-height: 25px"></ul>
|
||||
</div>
|
||||
<% html_title(l(:label_enterprise_all)) -%>
|
|
@ -31,7 +31,7 @@
|
|||
<div class="main-content-bar" id="main-content-bar">
|
||||
<div style="float: left;padding-left:15px ">
|
||||
<!-- <#%= image_tag(get_project_avatar(@first_page), size: "75x75") %> -->
|
||||
<% if @enterprise.nil? %>
|
||||
<% if @organization.nil? %>
|
||||
<% if get_avatar?(@first_page) %>
|
||||
<%= image_tag(url_to_avatar(@first_page), width:@first_page.image_width,height: @first_page.image_height) %>
|
||||
<% else %>
|
||||
|
@ -42,13 +42,13 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="welcome_left" id="welcome_left">
|
||||
<% if @enterprise.nil? %>
|
||||
<% if @organization.nil? %>
|
||||
<% unless @first_page.nil? %>
|
||||
<%= @first_page.description.html_safe %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
||||
<span class="font_welcome_school" style="color: #E8770D"> <%= link_to @enterprise, options={:action => 'index', :enterprise => @enterprise}, html_options={ :method => 'get', :style => "color: #E8770D"} %> </span>
|
||||
<span class="font_welcome_school" style="color: #E8770D"> <%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %> </span>
|
||||
<br/>
|
||||
<span class="font_welcome_trustie"> <%= @first_page.title %> </span>
|
||||
<% end %>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<!-- 如果企业版参数正确,这进入企业版页面 -->
|
||||
<% if @originization.nil? %>
|
||||
<% if @organization.nil? %>
|
||||
<% @projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end; reset_cycle %>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<% elsif @e_count < 10 %>
|
||||
<% @originization_projects.map do |project| %>
|
||||
<% @organization_projects.map do |project| %>
|
||||
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
|
||||
<% end %>
|
||||
<p id="errorExplanation"><%= l(:label_part_enterprise_tips) %></p>
|
||||
|
|
|
@ -247,7 +247,7 @@ zh:
|
|||
label_course_closed_tips: "确定要%{desc}课程?"
|
||||
# end
|
||||
field_name: 名称
|
||||
field_enterprise_name: 企业名
|
||||
field_enterprise_name: 组织名称
|
||||
#added by huang
|
||||
field_tea_name: 教师
|
||||
field_couurse_time: 学时
|
||||
|
@ -2224,7 +2224,8 @@ zh:
|
|||
label_project_deposit: 项目托管
|
||||
label_course_practice: 课程实践
|
||||
label_forum_all: 公共贴吧
|
||||
label_school_all: 中国高校
|
||||
label_school_all: 中国高校
|
||||
label_enterprise_all: 组织
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_software_user: 软件创客
|
||||
label_requirement_enterprise: 软件众包
|
||||
|
@ -2520,6 +2521,6 @@ zh:
|
|||
label_all_enterprises: 所有企业
|
||||
label_my_enterprise: 我的企业
|
||||
label_enterprise_tips: 暂时还没有该企业对应的项目,系统的其它项目您可能会感兴趣!
|
||||
label_part_enterprise_tips: 系统的其它项目您可能也会感兴趣!
|
||||
label_part_enterprise_tips: 您可能对系统的其它项目会感兴趣!
|
||||
label_enterprise_nil: 该模块为最新上线模块,目前还未有项目关联到企业!
|
||||
label_enterprises: 名企
|
||||
label_enterprises: 组织
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
# Example: :via => :get ====> :via => :get
|
||||
|
||||
RedmineApp::Application.routes.draw do
|
||||
get "originizations/index"
|
||||
get "organizations/index"
|
||||
|
||||
#match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => 'index'
|
||||
|
||||
|
@ -390,7 +390,7 @@ RedmineApp::Application.routes.draw do
|
|||
match '/statistics', :to => 'projects#statistics', :as => 'statistics', :via => :get
|
||||
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
|
||||
match '/homework', :to => 'projects#homework', :as => 'homework', :via => :get
|
||||
match 'originizations', :to => 'originizations#index', :as => 'index', :via => :get
|
||||
match 'organizations', :to => 'organizations#index', :as => 'index', :via => :get
|
||||
|
||||
# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get
|
||||
# match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
|
@ -8,6 +8,15 @@ h3, .wiki h2 {font-size: 15px; padding-left: 5px}
|
|||
h4, .wiki h3 {font-size: 13px;}
|
||||
h4 {border-bottom: 1px dotted #bbb;}
|
||||
/*huang*/
|
||||
/*企业版样式*/
|
||||
.content_syqy{ width:940px; height:400px; border:1px;}
|
||||
.content_syqy .list{ font-size:14px; font-weight:normal; margin-left:10px; font-weight:bold; padding-top:10px}
|
||||
.syqy_box{ margin-left:-30px; margin-top:5px;}
|
||||
.syqy_box ul li{ float:left; margin-right:10px; border:1px solid #e3e3e3; width:215px; height:30px; padding:5px; padding-right:0px; margin-bottom:10px; overflow:hidden; text-overflow:ellipsis;font-size:14px; color:#464646;white-space: nowrap; }
|
||||
.syqy_box ul li img{ float:left; margin-right:3px; }
|
||||
.syqy_box ul li a { font-size:14px; color:#464646; height:30px; padding-top:500px;}
|
||||
.syqy_box ul li a:hover{color:#15bccf;}
|
||||
a.syqy_wenzi{ padding-bottom:10px; border:1px solid red;}
|
||||
/*current position*/
|
||||
.enterprise_all{
|
||||
padding-left: 20px;
|
||||
|
|
Loading…
Reference in New Issue