Merge branch 'szzh' into develop

dev_repository_hjq v20150131_2
sw 11 years ago
commit ce803ee62e

@ -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] before_filter :entry_select, :only => [:index]
def index def index
unless params[:originization].nil? unless params[:project].nil?
@originization = params[:originization] @cur_projects = Project.find(params[:project])
@originization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @originization]) @organization = @cur_projects.enterprise_name
@e_count = @originization_projects.count @organization_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @organization])
if @e_count < 10 @e_count = @organization_projects.count
part_count = 10 -@e_count if @e_count < 9
part_count = 9 - @e_count
# @part_projects = find_all_hot_project part_count, order # @part_projects = find_all_hot_project part_count, order
@part_projects = find_miracle_project(part_count, 3,"score desc") @part_projects = find_miracle_project(part_count, 3,"score desc")
limit = 10 - @e_count
end end
end end
if @first_page.nil? || @first_page.sort_type.nil? if @first_page.nil? || @first_page.sort_type.nil?

@ -159,8 +159,9 @@
</td> </td>
<!-- 评价显隐控制按钮--> <!-- 评价显隐控制按钮-->
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %> <% if ((User.current.id == @contest.author_id) && (@contest.deadline >= Date.today))||User.current.admin %>
<td valign="top" align="right" width="10%"> <td valign="top" align="right" width="10%">
<span> <%= toggle_link l(:label_reward), c_project.id.to_s %></span> <span> <%= toggle_link l(:label_reward), c_project.id.to_s %></span>
<!-- 评价应标项目的表单 --> <!-- 评价应标项目的表单 -->
<span style="display: none; vertical-align: top " id='<%= c_project.id %>'> <span style="display: none; vertical-align: top " id='<%= c_project.id %>'>
@ -176,6 +177,7 @@
<%= f.submit :value => l(:button_submit), :class => "submit" %> <%= f.submit :value => l(:button_submit), :class => "submit" %>
<% end %> <% end %>
</span> </span>
</td> </td>
<% end %> <% end %>
</div> </div>
@ -282,7 +284,7 @@
</td> </td>
<!-- 评价显隐控制按钮--> <!-- 评价显隐控制按钮-->
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %> <% if ((User.current.id == @contest.author_id) && (@contest.deadline >= Date.today))||User.current.admin %>
<div style="text-align: right;width: 100%;"> <div style="text-align: right;width: 100%;">
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span> <span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
<!-- 评价应标项目的表单 --> <!-- 评价应标项目的表单 -->

@ -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}" />
<%= link_to project.enterprise_name, home_path(:project => project) %></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)) -%>

@ -8,7 +8,7 @@
<span class="private_project"> <%= l(:label_private) %> </span> <span class="private_project"> <%= l(:label_private) %> </span>
<% end %> <% end %>
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%> <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>) (<%= link_to l(:label_project_member_amount, :count=>projectCount(project)), project_member_path(project) ,:course =>'0' %>)
</div> </div>
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;min-height: 42px;"> <div style=" float: left;margin:5px; margin-left: 10px; width: 380px;min-height: 42px;">
<span class='font_lighter' title ='<%= project.short_description%>'> <%=project.description.truncate(90, omission: '...')%> </span> <span class='font_lighter' title ='<%= project.short_description%>'> <%=project.description.truncate(90, omission: '...')%> </span>
@ -16,7 +16,7 @@
<div > <div >
<%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s, <%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s,
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300;", :style => "cursor: pointer; display: inline-block; float: right; color: #ec6300;",
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度", :title => l(:label_project_score_tips),
:class => "tooltip", :class => "tooltip",
:id => "tooltip-#{project.id}" %> :id => "tooltip-#{project.id}" %>
</div> </div>

@ -31,7 +31,7 @@
<div class="main-content-bar" id="main-content-bar"> <div class="main-content-bar" id="main-content-bar">
<div style="float: left;padding-left:15px "> <div style="float: left;padding-left:15px ">
<!-- <#%= image_tag(get_project_avatar(@first_page), size: "75x75") %> --> <!-- <#%= image_tag(get_project_avatar(@first_page), size: "75x75") %> -->
<% if @enterprise.nil? %> <% if @organization.nil? %>
<% if get_avatar?(@first_page) %> <% if get_avatar?(@first_page) %>
<%= image_tag(url_to_avatar(@first_page), width:@first_page.image_width,height: @first_page.image_height) %> <%= image_tag(url_to_avatar(@first_page), width:@first_page.image_width,height: @first_page.image_height) %>
<% else %> <% else %>
@ -41,16 +41,19 @@
<%= image_tag '/images/avatars/Project/0', width:@first_page.image_width,height: @first_page.image_height %> <%= image_tag '/images/avatars/Project/0', width:@first_page.image_width,height: @first_page.image_height %>
<% end %> <% end %>
</div> </div>
<div class="welcome_left" id="welcome_left"> <div class="welcome_left" id="welcome_left" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<% if @enterprise.nil? %> <% if @organization.nil? %>
<% unless @first_page.nil? %> <% unless @first_page.nil? %>
<%= @first_page.description.html_safe %> <%= @first_page.description.html_safe %>
<% end %> <% end %>
<% else %> <% else %>
<span class="font_welcome_school" style="color: #E8770D">
<span class="font_welcome_school" style="color: #E8770D"> <%= link_to @enterprise, options={:action => 'index', :enterprise => @enterprise}, html_options={ :method => 'get', :style => "color: #E8770D"} %> </span> <%= link_to @organization, options={:action => 'index', :enterprise => @organization}, html_options={ :method => 'get', :style => "color: #E8770D"} %>
</span>
<br/> <br/>
<span class="font_welcome_trustie"> <%= @first_page.title %> </span> <span class="font_welcome_trustie">
<%= @first_page.title %>
</span>
<% end %> <% end %>
</div> </div>
<div class="search-bar" id="search-bar"> <div class="search-bar" id="search-bar">
@ -77,7 +80,7 @@
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<ul class="d-p-projectlist"> <ul class="d-p-projectlist">
<!-- 如果企业版参数正确,这进入企业版页面 --> <!-- 如果企业版参数正确,这进入企业版页面 -->
<% if @originization.nil? %> <% if @organization.nil? %>
<% @projects.map do |project| %> <% @projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end; reset_cycle %> <% end; reset_cycle %>
@ -89,7 +92,7 @@
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end %> <% end %>
<% elsif @e_count < 10 %> <% elsif @e_count < 10 %>
<% @originization_projects.map do |project| %> <% @organization_projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %> <%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end %> <% end %>
<p id="errorExplanation"><%= l(:label_part_enterprise_tips) %></p> <p id="errorExplanation"><%= l(:label_part_enterprise_tips) %></p>

@ -247,7 +247,7 @@ zh:
label_course_closed_tips: "确定要%{desc}课程?" label_course_closed_tips: "确定要%{desc}课程?"
# end # end
field_name: 名称 field_name: 名称
field_enterprise_name: 企业名 field_enterprise_name: 组织名称
#added by huang #added by huang
field_tea_name: 教师 field_tea_name: 教师
field_couurse_time: 学时 field_couurse_time: 学时
@ -2219,17 +2219,22 @@ zh:
# 托管平台主页 # 托管平台主页
# edit by meng # edit by meng
# 托管平台主页> 顶部菜单 # 托管平台主页> 顶部菜单>
field_homepage: 主页 field_homepage: 主页
label_project_deposit: 项目托管 label_project_deposit: 项目托管
label_course_practice: 课程实践 label_course_practice: 课程实践
label_forum_all: 公共贴吧 label_forum_all: 公共贴吧
label_school_all: 中国高校
label_enterprise_all: 组织
label_contest_innovate: 创新竞赛 label_contest_innovate: 创新竞赛
label_software_user: 软件创客 label_software_user: 软件创客
label_requirement_enterprise: 软件众包 label_requirement_enterprise: 软件众包
label_stores_index: 资源搜索 label_stores_index: 资源搜索
# 托管平台主页> 顶部菜单>
# 托管平台主页 > 搜索提示信息 # 托管平台主页 > 搜索提示信息
label_search_information: 请输入要搜索的关键字 label_search_information: 请输入要搜索的关键字
# 托管平台主页 > 下拉列表 # 托管平台主页 > 下拉列表
@ -2509,3 +2514,13 @@ zh:
next: "下一页 &raquo;" next: "下一页 &raquo;"
truncate: "..." truncate: "..."
# 项目企业模块
label_all_enterprises: 所有企业
label_my_enterprise: 我的企业
label_enterprise_tips: 暂时还没有该企业对应的项目,系统的其它项目您可能会感兴趣!
label_part_enterprise_tips: 您可能对系统的其它项目会感兴趣!
label_enterprise_nil: 该模块为最新上线模块,目前还未有项目关联到企业!
label_enterprises: 组织

@ -26,7 +26,7 @@
# Example: :via => :get ====> :via => :get # Example: :via => :get ====> :via => :get
RedmineApp::Application.routes.draw do RedmineApp::Application.routes.draw do
get "originizations/index" get "organizations/index"
#match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => '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 '/statistics', :to => 'projects#statistics', :as => 'statistics', :via => :get
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get # match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
match '/homework', :to => 'projects#homework', :as => 'homework', :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 '/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 # match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get

@ -1 +1 @@
Subproject commit 3cabcc643f36939939685e6f55273dfbf89da545 Subproject commit 222a9bdd72014f197baf2131ab71cc41660111ed

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, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;} h4 {border-bottom: 1px dotted #bbb;}
/*huang*/ /*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 { float:left;font-size:14px; color:#464646; height:30px; padding-top:4px; width: 175px; overflow:hidden; text-overflow:ellipsis;}
.syqy_box ul li a:hover{color:#15bccf;}
a.syqy_wenzi{ padding-bottom:10px; border:1px solid red;}
/*current position*/ /*current position*/
.enterprise_all{ .enterprise_all{
padding-left: 20px; padding-left: 20px;

@ -1,7 +1,5 @@
/* CSS Document */ /* CSS Document */
#content{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;} #content,#popbox,#popbox02{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;}
#popbox{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;}
#popbox02{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;}
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;} div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;}
div,img,tr,td,textarea{ border:0;} div,img,tr,td,textarea{ border:0;}
table,tr,td{border:0; cellspacing:0; cellpadding:0;} table,tr,td{border:0; cellspacing:0; cellpadding:0;}

Loading…
Cancel
Save