Conflicts:
	config/locales/zh.yml
email_verify
alan 11 years ago
commit 134f0d5557

@ -91,6 +91,10 @@ GEM
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
dnsruby (1.57.0)
email_verifier (0.0.7)
dnsruby (>= 1.5)
rails (>= 3.0.0)
equalizer (0.0.9)
erubis (2.7.0)
execjs (2.2.1)
@ -166,6 +170,7 @@ GEM
mysql2 (0.3.11-x86-mingw32)
nenv (0.2.0)
net-ldap (0.3.1)
newrelic_rpm (3.9.9.275)
nokogiri (1.6.3)
mini_portile (= 0.6.0)
nokogiri (1.6.3-x86-mingw32)
@ -315,6 +320,7 @@ DEPENDENCIES
capybara (~> 2.4.1)
coderay (~> 1.0.6)
coffee-rails (~> 3.2.1)
email_verifier
factory_girl (~> 4.4.0)
faker
fastercsv (~> 1.5.0)
@ -330,6 +336,7 @@ DEPENDENCIES
mocha (~> 1.1.0)
mysql2 (= 0.3.11)
net-ldap (~> 0.3.1)
newrelic_rpm
nokogiri (~> 1.6.3)
paperclip (~> 3.5.4)
rack-mini-profiler!

@ -1,6 +0,0 @@
class EnterprisesController < ApplicationController
layout 'project_base'
def index
@enterprises = Project.find_by_sql("select enterprise_name from projects")
end
end

@ -0,0 +1,6 @@
class OriginizationsController < ApplicationController
layout 'project_base'
def index
@enterprises = Project.find_by_sql("select distinct(enterprise_name) from projects")
end
end

@ -25,10 +25,10 @@ class WelcomeController < ApplicationController
before_filter :entry_select, :only => [:index]
def index
unless params[:enterprise].nil?
@enterprise = params[:enterprise]
@enterprise_projects = Project.find_by_sql(["select * from projects where enterprise_name =? ", @enterprise])
@e_count = @enterprise_projects.count
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
# @part_projects = find_all_hot_project part_count, order

@ -7,6 +7,7 @@ class ZipdownController < ApplicationController
SAVE_FOLDER = "#{Rails.root}/files"
OUTPUT_FOLDER = "#{Rails.root}/tmp/archiveZip"
def assort
if params[:obj_class] == "Bid"
bid = Bid.find params[:obj_id]

@ -35,7 +35,7 @@ class Course < ActiveRecord::Base
acts_as_nested_set :order => 'name', :dependent => :destroy
acts_as_attachable :view_permission => :view_course_files,
:delete_permission => :manage_files
validates_presence_of :password, :term,:name
validates_format_of :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/

@ -1,7 +1,7 @@
<head>
<meta charset="utf-8">
<title>注册帐号</title>
<title><%= l(:label_regiter_account)%></title>
<style type="text/css">
#jihuo {
background-image: url("/images/jingtanhao.JPG");
@ -14,15 +14,15 @@
<div style="border: 1px solid #c0c0c0 ; width:850px; margin-top: 10px" >
<h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; ">
<span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3>
<span id = "jihuo" style=" margin-left: 4%;"></span><%= l(:label_email_valid)%></h3>
<div style="margin-left:auto; margin-right:auto">
<center>
<div >
<h4 style="font-size: 18px;margin-top: 10px; padding-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4>
<h4 style="font-size: 18px;margin-top: 10px; padding-bottom: 10px;"><%= l(:notice_email_register_time)%></h4>
<div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<span >邮件已发送到邮箱</span>
<span ><%= l(:notice_email_arrival)%></span>
<a href="#" class="f-blue"><%= @user.mail %></a>
</div>
<p>
@ -32,7 +32,7 @@
border: none;
padding: 10px 16px;
line-height: 1.33;" target="_blank">立即查收邮件</a>
line-height: 1.33;" target="_blank"><%= l(:label_check_email)%></a>
&nbsp; &nbsp; <%= link_to l(:label_mail_resend), { :controller => 'account', :action => 'resendmail',:user => @user}, :remote => true, :method => 'get' %>
</p>

@ -3,7 +3,7 @@
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<h3><%=l(:label_password_lost)%></h3>
<h3><%=l(:label_password_forget)%></h3>
<%= form_tag(lost_password_path) do %>
<div class="box tabular">

@ -37,7 +37,7 @@
</head>
<body>
<div class="container">
<div class="container" id="content">
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
@ -75,7 +75,6 @@
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620",
:maxlength => 3000, :placeholder => "最多3000个汉字" %>
</p>
<div class="cl"></div>
<p>
<label style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;

@ -37,7 +37,7 @@
function submit_homework_form(){if(regexName()&&regexDescription()){$('#new_homework_attach').submit();}}
</script>
<div class="container">
<div class="container" id="content">
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
@ -82,9 +82,6 @@
<br />
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
</p>
<br/> <span id="homework_attach_description_span" style="padding-left: 100px;"></span>
</p>
<div class="cl"></div>
<p>
<label style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;

@ -0,0 +1,11 @@
<%# Link to the "First" page
- available local variables
url: url to the first page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%>
<%= link_to_unless current_page.first?, l('views.pagination.first').html_safe, url, :remote => remote %>

@ -0,0 +1,8 @@
<%# Non-link tag that stands for skipped pages...
- available local variables
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%>

@ -0,0 +1,11 @@
<%# Link to the "Last" page
- available local variables
url: url to the last page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%>
<%= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote %>

@ -0,0 +1,11 @@
<%# Link to the "Next" page
- available local variables
url: url to the next page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%>
<%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote %>

@ -0,0 +1,13 @@
<%# Link showing page number
- available local variables
page: a page object for "this" page
url: url to this page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
<%= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
-%>
<%= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>

@ -0,0 +1,23 @@
<%# The container tag
- available local variables
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
paginator: the paginator that renders the pagination tags inside
-%>
<%= paginator.render do -%>
<div class="pagination">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</div>
<% end -%>

@ -0,0 +1,11 @@
<%# Link to the "Previous" page
- available local variables
url: url to the previous page
current_page: a page object for the currently displayed page
total_pages: total number of pages
per_page: number of items to fetch per page
remote: data-remote
-%>
<%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, :rel => 'prev', :remote => remote %>

@ -80,6 +80,7 @@
<%=link_to l(:field_homepage), home_path %> >
<a href="http://<%= Setting.host_contest %>" class="link_other_item">
<%=l(:label_contests_management_platform)%>
</a> >
<span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), contest_contestnotifications_path(@contest) %>

@ -10,7 +10,7 @@
<% unless enterprise.enterprise_name.blank? %>
<ul>
<li>
<%= link_to enterprise.enterprise_name, home_path(:enterprise => enterprise.enterprise_name) %>
<%= link_to enterprise.enterprise_name, home_path(:originization => enterprise.enterprise_name) %>
</li>
</ul>
<% end %>

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@
<span class="private_project"> <%= l(:label_private) %> </span>
<% end %>
<%= 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 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>
@ -16,7 +16,7 @@
<div >
<%= 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;",
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
:title => l(:label_project_score_tips),
:class => "tooltip",
:id => "tooltip-#{project.id}" %>
</div>

@ -61,6 +61,7 @@ form #search_by
.search_widget{
display:inline-block;
border-radius: 5px;
float: right;
}
.search_widget:hover{
box-shadow: 0px 0px 3px #56B4EF;
@ -87,14 +88,13 @@ form #search_by
</script>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right">
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
<div class='search_widget' >
<%= text_field_tag :q, nil, :placeholder => l(:label_search_information), style:"float:left;" %>
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([[l(:label_select_user_nickname),"0"],[l(:label_select_user_showname),"1"],[l(:label_select_user_email),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
</div>
</div>
<% end %>

@ -77,7 +77,7 @@
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<!-- 如果企业版参数正确,这进入企业版页面 -->
<% if @enterprise.nil? %>
<% if @originization.nil? %>
<% @projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end; reset_cycle %>
@ -87,9 +87,9 @@
<p id="errorExplanation"><%= l(:label_enterprise_tips) %></p>
<% @projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end; reset_cycle %>
<% end %>
<% elsif @e_count < 10 %>
<% @enterprise_projects.map do |project| %>
<% @originization_projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end %>
<p id="errorExplanation"><%= l(:label_part_enterprise_tips) %></p>
@ -100,8 +100,8 @@
<% @part_projects.map do |project| %>
<%= render :partial => 'hot_projects_list', :locals => {:project => project} %>
<% end %>
<% end; reset_cycle %>
<% end; reset_cycle %>
<% end %>
<% end %>
</ul>
</div>
</div>
@ -132,7 +132,7 @@
<span style="color: rgb(172, 174, 177)">
<%= l(:field_updated_on) %>
<%= format_time event.event_datetime %>
<%= l(:field_time_ago) %>
<%#= l(:field_time_ago) %>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="float: right; color: rgb(172, 174, 177);">
@ -161,7 +161,7 @@
<% topics = find_new_forum_topics(6) %>
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
<% cache topic do %>
<li class="message-brief-intro">
<li class="message-brief-intro" style="line-height:1.4em;">
<div class='memo_title text_nowrap'>
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>

@ -0,0 +1,32 @@
# Time 2015-01-30 17:04:12
# Author lizanle
# Description kaminari配置文件
# <%= paginate @users, :window => 2 %>
# 则展示页会像 5 6 7 8 9 当7是当前页的时候
# <%= paginate @users, :outer_window => 3 %>
# 分页展示会像 1 2 3 4 ...(snip)... 17 18 19 20 当总共有20个页面的时候
# <%= paginate @users, :left => 1, :right => 3 %>
# 分页展示会像 1 ...(snip)... 18 19 20 当总共有20个页面的时候
# <%= paginate @users, :param_name => :pagina %>
# 这样子会将每个链接传进去一个参数 :pagina
# <%= paginate @users, :params => {:controller => 'foo', :action => 'bar'} %>
# 这样子将会修改每个链接的控制器和动作. :controller and :action
# <%= paginate @users, :remote => true %>
# 这将会使每个链接使用ajax方式极其简单非常完美的工作。data-remote="true"
#更多知识详见 https://github.com/honwlee/kaminari
Kaminari.configure do |config|
# config.default_per_page = 25
# config.max_per_page = nil
# config.window = 4
# config.outer_window = 3
# config.left = 0
# config.right = 0
# config.page_method_name = :page
# config.param_name = :page
end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save