ADD home page
This commit is contained in:
parent
69d33dfe88
commit
30ff3234aa
|
@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
|
|||
include Redmine::Pagination
|
||||
include RoutesHelper
|
||||
helper :routes
|
||||
|
||||
|
||||
#added by william
|
||||
helper :watchers
|
||||
|
||||
|
@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base
|
|||
helper Redmine::MenuManager::MenuHelper
|
||||
|
||||
def user_agent
|
||||
logger.info "HTTP_USER_AGENT #{request.env["HTTP_USER_AGENT"]}"
|
||||
logger.info "HTTP_USER_AGENT #{request.env["HTTP_USER_AGENT"]}"
|
||||
end
|
||||
|
||||
def session_expiration
|
||||
|
@ -72,7 +72,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def session_expired?
|
||||
if Setting.session_lifetime?
|
||||
unless session[:ctime] && (Time.now.utc.to_i - session[:ctime].to_i <= Setting.session_lifetime.to_i * 60)
|
||||
|
@ -474,7 +474,7 @@ class ApplicationController < ActionController::Base
|
|||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
|
||||
# Finds and sets @project based on @object.project
|
||||
def find_project_from_association
|
||||
render_404 unless @object.present?
|
||||
|
@ -488,7 +488,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def find_contest_from_association
|
||||
render_404 unless @object.present?
|
||||
|
||||
|
@ -810,10 +810,10 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
if offset.nil? && options[:page].present?
|
||||
offset = (options[:page].to_i - 1) * limit
|
||||
offset = 0 if offset < 0
|
||||
offset = 0 if offset < 0
|
||||
offset ||= 0
|
||||
end
|
||||
|
||||
|
||||
|
||||
[offset, limit]
|
||||
end
|
||||
|
@ -876,7 +876,7 @@ class ApplicationController < ActionController::Base
|
|||
if unsaved_issue_ids.empty?
|
||||
flash[:notice] = l(:notice_successful_update) unless issues.empty?
|
||||
else
|
||||
flash[:error] = l(:notice_failed_to_save_issues,
|
||||
flash[:error] = l(:notice_failed_to_save_issues,
|
||||
:count => unsaved_issue_ids.size,
|
||||
:total => issues.size,
|
||||
:ids => '#' + unsaved_issue_ids.join(', #'))
|
||||
|
@ -961,7 +961,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def find_web_footer
|
||||
@organizer = WebFooterOranizer.first
|
||||
@companies = WebFooterCompany.all
|
||||
@companies = WebFooterCompany.partners
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
class HomesController < ApplicationController
|
||||
layout 'base_introduce'
|
||||
|
||||
# GET /homes
|
||||
# GET /homes.json
|
||||
def index
|
||||
@home = Home.includes(:banners, :cover => [:file]).first
|
||||
@dynamic_news = DynamicNew.limit(4)
|
||||
@companies = WebFooterCompany.dedicators.limit(26)
|
||||
@first_companies_group = Array(@companies.slice(0, 8))
|
||||
@second_companies_group = Array(@companies.slice(8, 10))
|
||||
@third_companies_group = Array(@companies.slice(18, 8))
|
||||
end
|
||||
|
||||
# GET /homes/1
|
||||
# GET /homes/1.json
|
||||
def show
|
||||
@home = Home.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @home }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /homes/new
|
||||
# GET /homes/new.json
|
||||
def new
|
||||
@home = Home.new
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.json { render json: @home }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /homes/1/edit
|
||||
def edit
|
||||
@home = Home.find(params[:id])
|
||||
end
|
||||
|
||||
# POST /homes
|
||||
# POST /homes.json
|
||||
def create
|
||||
@home = Home.new(params[:home])
|
||||
|
||||
respond_to do |format|
|
||||
if @home.save
|
||||
format.html { redirect_to @home, notice: 'Home was successfully created.' }
|
||||
format.json { render json: @home, status: :created, location: @home }
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @home.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# PUT /homes/1
|
||||
# PUT /homes/1.json
|
||||
def update
|
||||
@home = Home.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @home.update_attributes(params[:home])
|
||||
format.html { redirect_to @home, notice: 'Home was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @home.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /homes/1
|
||||
# DELETE /homes/1.json
|
||||
def destroy
|
||||
@home = Home.find(params[:id])
|
||||
@home.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to homes_url }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -4,9 +4,15 @@ class WebFooterCompaniesController < ApplicationController
|
|||
menu_item :plugins, :only => :plugins
|
||||
menu_item :info, :only => :info
|
||||
before_filter :require_admin
|
||||
before_filter :get_type
|
||||
|
||||
def index
|
||||
@companys = WebFooterCompany.all
|
||||
@companys =
|
||||
if @type == WebFooterCompany::RELATION_TYPE[1]
|
||||
WebFooterCompany.dedicators
|
||||
else
|
||||
WebFooterCompany.partners
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -14,14 +20,16 @@ class WebFooterCompaniesController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
logger.info ""
|
||||
@company = WebFooterCompany.new(params[:web_footer_company])
|
||||
@company.key = (@type == WebFooterCompany::RELATION_TYPE[1]) ? WebFooterCompany::RELATION_TYPE[1] : WebFooterCompany::RELATION_TYPE[0]
|
||||
if @company.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to web_footer_companies_url
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
else
|
||||
flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}"
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new'}
|
||||
format.html { redirect_to new_web_footer_company_path(type: @type) }
|
||||
format.api { render_validation_errors(@company) }
|
||||
end
|
||||
|
||||
|
@ -31,7 +39,7 @@ class WebFooterCompaniesController < ApplicationController
|
|||
def destroy
|
||||
@company = WebFooterCompany.find(params[:id])
|
||||
@company.destroy
|
||||
redirect_to web_footer_companies_url
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
end
|
||||
|
||||
def edit
|
||||
|
@ -42,11 +50,17 @@ class WebFooterCompaniesController < ApplicationController
|
|||
@company = WebFooterCompany.find(params[:id])
|
||||
if @company.update_attributes(params[:web_footer_company])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to web_footer_companies_url
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
else
|
||||
flash[:error] = "#{l :web_footer_company_update_fail}: #{@company.errors.full_messages[0]}"
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_type
|
||||
@type = params[:type].to_s.strip
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
module HomesHelper
|
||||
|
||||
def home_cover_tag(home)
|
||||
file_path = home&.cover&.file.nil? ? "/images/introduce/activeBanner.jpg": local_path(home.cover.file)
|
||||
image_tag(file_path, class: 'mb25', height: '226px', width: '592px')
|
||||
end
|
||||
|
||||
def home_banner_tag(banner)
|
||||
image_tag local_path(banner.file)
|
||||
end
|
||||
|
||||
def default_banner_tag(home)
|
||||
return unless home.banners.size == 0
|
||||
|
||||
content_tag :a do
|
||||
image_tag "/images/introduce/trustie.jpg"
|
||||
end
|
||||
end
|
||||
|
||||
def local_path(file)
|
||||
File.join("/files/uploads/image", file.disk_directory, file.disk_filename)
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
module WebFooterCompaniesHelper
|
||||
def label_new_button_name type
|
||||
(@type == WebFooterCompany::RELATION_TYPE[1]) ? l(:label_new_open_source_company) : l(:label_new_company)
|
||||
end
|
||||
|
||||
def label_title_name type
|
||||
(@type == WebFooterCompany::RELATION_TYPE[1]) ? l(:label_web_footer_open_source_compnay) : l(:label_web_footer_cooperation_compnay)
|
||||
end
|
||||
|
||||
def label_root_name type
|
||||
(@type == WebFooterCompany::RELATION_TYPE[1]) ? l(:label_open_source_compnay) : l(:label_cooperation_compnay)
|
||||
end
|
||||
|
||||
def label_edit_button_name type
|
||||
(@type == WebFooterCompany::RELATION_TYPE[1]) ? l(:label_new_open_source_company) : l(:label_edit_company)
|
||||
end
|
||||
end
|
|
@ -1,8 +1,13 @@
|
|||
class WebFooterCompany < ActiveRecord::Base
|
||||
RELATION_TYPE = %w(partner dedicator) # partner: 首页的开源生态模块中的单位; partner:与平台的合作单位
|
||||
attr_accessible :logo_size, :name, :url
|
||||
validates :name, presence: true, length: { maximum: 500 }
|
||||
validates :url, length: { maximum: 500 },
|
||||
format: { with: /(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/,
|
||||
message: :invalid
|
||||
}
|
||||
|
||||
scope :partners, -> { where(:key => WebFooterCompany::RELATION_TYPE[0]) }
|
||||
scope :dedicators, -> { where(:key => WebFooterCompany::RELATION_TYPE[1]) }
|
||||
|
||||
end
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
</p>
|
||||
<%= render 'tab_partial' %>
|
||||
<div style="float:right"><%= link_to l(:label_cooperation_compnay), web_footer_companies_path %></div>
|
||||
<div style="float:right; margin-right: 10px"><%= link_to l(:label_open_source_compnay), web_footer_companies_path(type: WebFooterCompany::RELATION_TYPE[1]) %></div>
|
||||
<h4><%=l(:label_web_footer_page)%></h4>
|
||||
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
|
@ -21,8 +22,3 @@
|
|||
</p>
|
||||
<%= submit_tag l(:button_save), :class => "small", :name => nil %>
|
||||
<% end %>
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<%= default_banner_tag(@home) %>
|
||||
|
||||
<% @home.banners.each do |banner| %>
|
||||
<a href="<%= banner.remote_path %>"><%= home_banner_tag(banner) %></a>
|
||||
<% end %>
|
|
@ -0,0 +1,32 @@
|
|||
<% unless @first_companies_group.blank? %>
|
||||
<div class="partner_item">
|
||||
<li class="inline">
|
||||
<% @first_companies_group.each do |company| %>
|
||||
<%= link_to image_tag(url_to_avatar(company),:alt=> company.name ), company.url, :target => "_blank" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless @second_companies_group.blank? %>
|
||||
<div class="partner_item">
|
||||
<li class="inline">
|
||||
<% @second_companies_group.each do |company| %>
|
||||
<%= link_to image_tag(url_to_avatar(company),:alt=> company.name ), company.url, :target => "_blank" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless @third_companies_group.blank? %>
|
||||
<div class="partner_item">
|
||||
<li class="inline">
|
||||
<% @third_companies_group.each do |company| %>
|
||||
<%= link_to image_tag(url_to_avatar(company),:alt=> company.name ), company.url, :target => "_blank" %>
|
||||
<% end %>
|
||||
<% if @companies.length > 26 %>
|
||||
<a href="javascript:void(0)"><img src="/images/introduce/more.png"/></a>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,15 @@
|
|||
<% dynamic_news&.each do |dynamic_new| %>
|
||||
<a href="<%= dynamic_new.remote_url %>">
|
||||
<div class="homepage_activity_list_item">
|
||||
<div>
|
||||
<p class="f18 mb15 lh20 color-grey3"><%= dynamic_new.title %></p>
|
||||
<p class="f13 mb8 c_grey02 task-hide-2" style="height: 38px;"><%= dynamic_new.content.html_safe %></p>
|
||||
<p>
|
||||
<span class="activity_tag">行业动态</span>
|
||||
<span class="fontGrey4 ml14 fl"><i class="iconfont icon-shijian f12 mr5 lh18 fl"></i><%= format_time(dynamic_new.created_at) %></span>
|
||||
</p>
|
||||
</div>
|
||||
<img src="<%= dynamic_new.cover_remote_url %>" class="ml20" width="158px" height="100px" />
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
|
@ -0,0 +1,55 @@
|
|||
<div class="homepage_introduce_trustieEduCode homepage_introduce_content_item">
|
||||
<div class="trustieEduCode_container cartoon">
|
||||
<div class="edu_c_panel">
|
||||
<ul class="edu_c_p_left">
|
||||
<li class="active">
|
||||
<i class="iconfont icon-menu_map mr15 f20"></i>实训项目</li>
|
||||
<li>
|
||||
<i class="iconfont icon-menu_voucher mr15 f20"></i>翻转课堂</li>
|
||||
<li>
|
||||
<i class="iconfont icon-huodong mr15 f20"></i>竞赛活动</li>
|
||||
<li>
|
||||
<i class="iconfont icon-menu_events mr15 f20"></i>作业查重</li>
|
||||
<li>
|
||||
<i class="iconfont icon-gongcheng mr15 f20"></i>工程教育</li>
|
||||
</ul>
|
||||
<div class="edu_c_p_right">
|
||||
<div class="c_p_right_item active">
|
||||
<div class="c_r_title">
|
||||
<p class="f22 mb20">翻转课堂</p>
|
||||
<p class="fontGrey4 f16">支持老师在线建立课堂,发布任务,学生完成任务,提交作业等各类教学场景</p>
|
||||
</div>
|
||||
<img src="/images/introduce/content2.png" style="margin-top: 45px"/>
|
||||
</div>
|
||||
<div class="c_p_right_item">
|
||||
<div class="c_r_title">
|
||||
<p class="f22 mb20">实训课程</p>
|
||||
<p class="fontGrey4 f16">实现实践教学的课程软件化、过程游戏化、环境生产化和评测全栈化</p>
|
||||
</div>
|
||||
<img src="/images/introduce/content1.png" style="margin-top: 45px"/>
|
||||
</div>
|
||||
<div class="c_p_right_item">
|
||||
<div class="c_r_title">
|
||||
<p class="f22 mb20">竞赛活动</p>
|
||||
<p class="fontGrey4 f16">汇集以高校竞赛为主,活动、社区为辅助的竞赛活动平台</p>
|
||||
</div>
|
||||
<img src="/images/introduce/content3.png" style="margin-top: 45px"/>
|
||||
</div>
|
||||
<div class="c_p_right_item">
|
||||
<div class="c_r_title">
|
||||
<p class="f22 mb20">作业查重</p>
|
||||
<p class="fontGrey4 f16">把好学生“质量关”,为高校教师提供教学过程中课程作业的查重服务</p>
|
||||
</div>
|
||||
<img src="/images/introduce/content4.png" style="margin-top: 45px"/>
|
||||
</div>
|
||||
<div class="c_p_right_item">
|
||||
<div class="c_r_title">
|
||||
<p class="f22 mb20">工程教育</p>
|
||||
<p class="fontGrey4 f16">达成度自动计算,自评报告一键导出,切实提升相关工程技术人才从业教育质量</p>
|
||||
</div>
|
||||
<img src="/images/introduce/content5.png" style="margin-top: 45px"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,28 @@
|
|||
<ul>
|
||||
<li class="active">
|
||||
<div>
|
||||
<img src="/images/nav_logo.png" width="50" class="mb40">
|
||||
<p class="f18">TrustieForge</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<img src="/images/introduce/edulogo.png" width="50" class="mb15">
|
||||
<p class="f18">TrustieEduCode</p>
|
||||
<p class="f16 mb20">智能学习平台</p>
|
||||
<p class="f12 mb30">实现实践教学的课程软件化、过程游戏化、<br/>环境生产化和评测全栈化</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<img src="/images/introduce/OSSEAN.png" class="mb40">
|
||||
<p class="f18">TrustieOSSEAN</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<img src="/images/introduce/codepedia.png" class="mb40">
|
||||
<p class="f18">TrustieCoderpedia</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
|
@ -0,0 +1,25 @@
|
|||
<%= form_for(@home) do |f| %>
|
||||
<% if @home.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@home.errors.count, "error") %> prohibited this home from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @home.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :name %><br />
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :content %><br />
|
||||
<%= f.text_area :content %>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,8 @@
|
|||
<div class="mr35">
|
||||
<%= home_cover_tag(home) %>
|
||||
<p class="f26 lh26 color-grey3 mb15"><%= home.name %></p>
|
||||
<p class="f16 c_grey02 break_full_word">
|
||||
<%= truncate(home.content.html_safe, length: Home::SHOW_CONTENT_LENGTH) %>
|
||||
</p>
|
||||
<a href="<%= home.more_content? ? home_path(home) : 'JavaScript:void(0)'%>" class="homepage_activity_more <%= home.more_content? ? 'visit_color' : 'disabled_color' %>">MORE<span>→</span></a>
|
||||
</div>
|
|
@ -0,0 +1,12 @@
|
|||
<li>
|
||||
<a href="https://www.trustie.net/">开源托管平台</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.educoder.net/" target="_blank">智能学习平台</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://ossean.trustie.net/" target="_blank">资源共享平台</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://codepedia.trustie.net/" target="_blank">众包学习平台</a>
|
||||
</li>
|
|
@ -0,0 +1,44 @@
|
|||
<div class="homepage_introduce_ossean homepage_introduce_content_item">
|
||||
<div class="cartoonTitle mt30 mb60">
|
||||
<p class="f20 mb20">协同开发社区</p>
|
||||
<p class="f16 color-grey3">600多所大学参与共建共享,支持全技术栈的实验和实训教学</p>
|
||||
</div>
|
||||
<ul class="cartoon ossean_list">
|
||||
<li>
|
||||
<div>
|
||||
<p class="f20 color-grey3 mb20">多元关联与反馈</p>
|
||||
<p class="f16 fontGrey4">对多源数据进行检测、关联、组合、反馈的过程</p>
|
||||
</div>
|
||||
<div>
|
||||
<i class="iconfont icon-gongyiliucheng"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<p class="f20 color-grey3 mb20">多元关联与反馈</p>
|
||||
<p class="f16 fontGrey4">对多源数据进行检测、关联、组合、反馈的过程</p>
|
||||
</div>
|
||||
<div>
|
||||
<i class="iconfont icon-shengmingzhouqi"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<p class="f20 color-grey3 mb20">多元关联与反馈</p>
|
||||
<p class="f16 fontGrey4">对多源数据进行检测、关联、组合、反馈的过程</p>
|
||||
</div>
|
||||
<div>
|
||||
<i class="iconfont icon-healthmode" style="font-size: 80px!important;"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<p class="f20 color-grey3 mb20">多元关联与反馈</p>
|
||||
<p class="f16 fontGrey4">对多源数据进行检测、关联、组合、反馈的过程</p>
|
||||
</div>
|
||||
<div>
|
||||
<i class="iconfont icon-yunweijiankong"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,14 @@
|
|||
<ul>
|
||||
<li>
|
||||
<p class="data_number"><%= @home.users_count %></p>
|
||||
<p class="f16">社区用户量</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="data_number"><%= @home.projects_count %></p>
|
||||
<p class="f16">开源项目</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="data_number"><%= @home.practical_training_projects_count %></p>
|
||||
<p class="f16">实训项目</p>
|
||||
</li>
|
||||
</ul>
|
|
@ -0,0 +1,44 @@
|
|||
<div class="homepage_introduce_trustieCoderpedia homepage_introduce_content_item">
|
||||
<div class="cartoonTitle mt30 ">
|
||||
<p class="f20 mb20">众包学习平台</p>
|
||||
<p class="f16 color-grey3">提供实验数据集给智能化软件开发技术研究和基准软件推荐</p>
|
||||
</div>
|
||||
<ul class="cartoon clearfix Coderpedia_list">
|
||||
<li>
|
||||
<div class="h_logo">
|
||||
<i class="iconfont icon-shebeiguanli"></i>
|
||||
</div>
|
||||
<p class="hoverLine"></p>
|
||||
<div class="coderpedia_i_content">
|
||||
<div>
|
||||
<p class="color-grey3 f20 lh20 mb20">标注引导</p>
|
||||
<p class="c_grey02 lh22">高质量代码标注<br/>提升代码可理解性</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="h_logo">
|
||||
<i class="iconfont icon-shebeiguanli"></i>
|
||||
</div>
|
||||
<p class="hoverLine"></p>
|
||||
<div class="coderpedia_i_content">
|
||||
<div>
|
||||
<p class="color-grey3 f20 lh20 mb20">群体标注</p>
|
||||
<p class="c_grey02 lh22">提供开源项目群体标注<br/>方便团队理解和查看</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="h_logo">
|
||||
<i class="iconfont icon-zhiliangkongzhi"></i>
|
||||
</div>
|
||||
<p class="hoverLine"></p>
|
||||
<div class="coderpedia_i_content">
|
||||
<div>
|
||||
<p class="color-grey3 f20 lh20 mb20">反馈修正</p>
|
||||
<p class="c_grey02 lh22">及时的反馈机制<br/>指出瑕疵并进行改进和修正</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,88 @@
|
|||
<div class="homepage_introduce_trustieForge homepage_introduce_content_item active">
|
||||
<div class="cartoonTitle mt30 mb80">
|
||||
<p class="f20 mb20">协同开发平台</p>
|
||||
<p class="f16 color-grey3">支撑国家9个软件园区创新平台,服务2500余家中小型软件企业研发</p>
|
||||
</div>
|
||||
<ul class="cartoon">
|
||||
<li class="plateContainer">
|
||||
<div class="plate_before">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="content_span">项目管理</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plate_back">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="f20 lh20 mt10">项目管理</span>
|
||||
<p class="lh20 mt60 mb80 f14 justify" style="height: 60px;">项目进程管理应用于研发管理、任务分配、目标跟踪等让项目管理流程高效完成。</p>
|
||||
<a href="http://forge.trustie.net" target="_blank" class="homepage_detailBtn">查看详情</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="plateContainer">
|
||||
<div class="plate_before">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="content_span">代码托管</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plate_back">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="f20 lh20 mt10">代码托管</span>
|
||||
<p class="lh20 mt60 mb80 f14 justify" style="height: 60px;">基于Git的代码托管,提供高性能远端仓库,可保护分支、历史版本比对等高级功能。</p>
|
||||
<a href="http://forge.trustie.net" target="_blank" class="homepage_detailBtn">查看详情</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="plateContainer">
|
||||
<div class="plate_before">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="content_span">质量检测</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plate_back">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="f20 lh20 mt10">质量检测</span>
|
||||
<p class="lh20 mt60 mb80 f14 justify" style="height: 60px;">采用一定检验测试手段和检查方法测定代码质量。</p>
|
||||
<a href="http://forge.trustie.net" target="_blank" class="homepage_detailBtn">查看详情</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="plateContainer">
|
||||
<div class="plate_before">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="content_span">交流社区</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plate_back">
|
||||
<div>
|
||||
<p>
|
||||
<i class="iconfont icon-menu_date colorWhite f40"></i>
|
||||
</p>
|
||||
<span class="f20 lh20 mt10">交流社区</span>
|
||||
<p class="lh20 mt60 mb80 f14 justify" style="height: 60px;">提供给IT开发者资源分享、学习交流、了解Trustie的社区。</p>
|
||||
<a href="http://forge.trustie.net" target="_blank" class="homepage_detailBtn">查看详情</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
<h1>Editing home</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @home %> |
|
||||
<%= link_to 'Back', homes_path %>
|
|
@ -0,0 +1,53 @@
|
|||
<div>
|
||||
<div class="clearfix homepage_banner">
|
||||
<p class="fl">
|
||||
<img src="/images/introduce/whiteLogo_word.png" height="24px" class="mt18 fl"/>
|
||||
<span class="fw400 ml20 fl" style="opacity: 0.7;line-height: 67px">持续构建协同、共享、可信的软件创新生态系统</span>
|
||||
</p>
|
||||
<ul class="fr homepage_banner_nav">
|
||||
<%= render :partial => 'nav_buttons' %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pr mt60 banner">
|
||||
<ul class="img">
|
||||
<li>
|
||||
<%= render :partial => 'banners'%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="homepage_activity">
|
||||
<%= render :partial => 'home', :locals => {:home => @home} %>
|
||||
<div>
|
||||
<p class="clearfix mb10">
|
||||
<span class="f26 lh26 color-grey3 fl mt3">社区动态</span>
|
||||
<a href="javaScript:void(0)" class="fr fontGrey4 mt8">更多>></a>
|
||||
</p>
|
||||
<div class="homepage_activity_list">
|
||||
<%= render :partial => 'dynamic_news', :locals => {:dynamic_news => @dynamic_news}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepage_introduce">
|
||||
<%= render 'floating_tabs' %>
|
||||
</div>
|
||||
|
||||
<div class="homepage_introduce_content">
|
||||
<div>
|
||||
<%= render :partial => 'trustie_forge' %>
|
||||
<%= render :partial => 'educoder' %>
|
||||
<%= render :partial => 'ossean' %>
|
||||
<%= render :partial => 'trustie_coderpedia' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data_panel">
|
||||
<%= render :partial => 'statistics'%>
|
||||
</div>
|
||||
<div class="partner_container">
|
||||
<p class="f32 mb60">开源生态</p>
|
||||
<div class="partner_list">
|
||||
<%= render :partial => 'companies' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<h1>New home</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', homes_path %>
|
|
@ -0,0 +1,15 @@
|
|||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @home.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Content:</b>
|
||||
<%= @home.content %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_home_path(@home) %> |
|
||||
<%= link_to 'Back', homes_path %>
|
|
@ -1,7 +1,7 @@
|
|||
<h3><%= link_to l(:label_cooperation_compnay), web_footer_companies_path %> » <%=l(:label_edit_company)%></h3>
|
||||
<h3><%= link_to label_root_name(@type), web_footer_companies_path(type: @type ) %> » <%= label_edit_button_name(@type) %></h3>
|
||||
<%= labelled_form_for @company do |f| %>
|
||||
<%= error_messages_for 'tracker' %>
|
||||
|
||||
<input type="hidden" name="type" value="<%= @type %>" />
|
||||
<div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
|
@ -16,4 +16,4 @@
|
|||
</div>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="contextual"><%= link_to l(:label_new_company), new_web_footer_company_path,:class => "icon icon-add" %></div>
|
||||
<h3><%=l(:label_web_footer_cooperation_compnay)%></h3>
|
||||
<div class="contextual"><%= link_to label_new_button_name(@type), new_web_footer_company_path(type: @type),:class => "icon icon-add" %></div>
|
||||
<h3><%= label_title_name(@type) %></h3>
|
||||
|
||||
<div id="logo_link">
|
||||
<% @companys.each do |company| %>
|
||||
<span class="footer_logo_link"><%= link_to image_tag(url_to_avatar(company),:size=>"100x30",:alt=>company.name),company.url, :target => "_blank" %></span>
|
||||
<%= link_to l(:button_edit),edit_web_footer_company_path(company) %>
|
||||
<%= delete_link web_footer_company_path(company) %>
|
||||
<hr/>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="logo_link">
|
||||
<% @companys.each do |company| %>
|
||||
<span class="footer_logo_link"><%= link_to image_tag(url_to_avatar(company),:size=>"100x30",:alt=>company.name),company.url, :target => "_blank" %></span>
|
||||
<%= link_to l(:button_edit),edit_web_footer_company_path(company, type: @type) %>
|
||||
<%= delete_link web_footer_company_path(company, type: @type) %>
|
||||
<hr/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<h3><%= link_to l(:label_cooperation_compnay), web_footer_companies_path %> » <%=l(:label_new_company)%></h3>
|
||||
<h3><%= link_to label_root_name(@type), web_footer_companies_path(type: @type) %> » <%= label_new_button_name(@type) %></h3>
|
||||
<%= labelled_form_for @company do |f| %>
|
||||
<%= error_messages_for 'tracker' %>
|
||||
|
||||
<input type="hidden" name="type" value="<%= @type %>" />
|
||||
<div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
|
@ -10,4 +10,4 @@
|
|||
</div>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -408,15 +408,20 @@ zh:
|
|||
label_organizer_name: 主办单位名称
|
||||
label_web_footer_description: 页脚内容
|
||||
label_cooperation_compnay: 合作单位
|
||||
label_open_source_compnay: 开源生态
|
||||
label_version_number: 版本
|
||||
label_version_description: 描述
|
||||
label_web_footer_cooperation_compnay: 网站页脚合作单位
|
||||
label_web_footer_open_source_compnay: 网站页脚开源生态单位
|
||||
label_new_company: 添加合作单位
|
||||
label_new_open_source_company: 添加开源生态单位
|
||||
label_edit_company: 编辑合作单位
|
||||
label_open_source_company: 编辑开源生态单位
|
||||
label_edit_open_source_company: 编辑开源生态单位
|
||||
label_upload_logo: 上传logo
|
||||
label_url_prompt: 网址需以"http://"或"https://"开头,例:http://forge.trustie.net
|
||||
web_footer_company_create_fail: 合作单位创建失败
|
||||
web_footer_company_update_fail: 合作单位更新失败
|
||||
web_footer_company_create_fail: 创建失败
|
||||
web_footer_company_update_fail: 更新失败
|
||||
is_not_url_error: 不是正确的网址
|
||||
label_x_projects:
|
||||
zero: 无项目
|
||||
|
|
|
@ -515,7 +515,8 @@ RedmineApp::Application.routes.draw do
|
|||
get "praise_tread/tread_plus"
|
||||
#end
|
||||
|
||||
root :to => 'welcome#index', :as => 'home'
|
||||
root :to => 'homes#index', :as => 'home'
|
||||
resources :homes, only: [:show]
|
||||
# added by longjun
|
||||
match 'welcome/contest', :via => :get
|
||||
# end longjun
|
||||
|
|
|
@ -71,13 +71,18 @@
|
|||
width: 160px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background-color: #2878FF;
|
||||
color: #fff!important;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
.disabled_color {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.visit_color {
|
||||
background-color: #2878FF;
|
||||
}
|
||||
.homepage_activity_more > span{
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
@ -589,21 +594,3 @@
|
|||
.tac_f_link a:last-child:after{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue