Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanxd 2014-05-26 08:56:58 +08:00
commit 2273a6fd0b
22 changed files with 265 additions and 408 deletions

View File

@ -1,6 +1,7 @@
class TestController < ApplicationController
helper :UserScore
layout 'bootstrap_base'
def zip
homeworks_attach_path = []

View File

@ -1338,9 +1338,11 @@ module ApplicationHelper
def hubspot_head
tags = javascript_include_tag('hubspot/messenger.min', 'hubspot/messenger-theme-future')
tags << stylesheet_link_tag('hubspot/messenger', 'hubspot/messenger-theme-future', 'hubspot/messenger-theme-flat')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
end
def bootstrap_head
tags = stylesheet_link_tag('bootstrap/bootstrap.min', 'bootstrap/bootstrap-theme.min')
tags << javascript_include_tag('bootstrap/bootstrap.min', 'bootstrap/jquery.transition.min')
tags
end
@ -1610,6 +1612,13 @@ module ApplicationHelper
def render_dynamic_nav
home_link = link_to l(:field_homepage), {:controller => 'welcome', :action => 'index'}
home_link = "<li>" << home_link << "</li>"
bootstrap_render_dynamic_nav
content_tag :ul, (home_link.html_safe+bootstrap_render_dynamic_nav)
end
def bootstrap_render_dynamic_nav
main_course_link = link_to l(:label_course_practice), {:controller => 'welcome', :action => 'index', :host => Setting.course_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}
@ -1630,7 +1639,6 @@ module ApplicationHelper
#@nav_dispaly_project_label
nav_list = Array.new
nav_list.push(home_link) if !@nav_dispaly_home_path_label
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label
@ -1651,7 +1659,7 @@ module ApplicationHelper
nav_list.collect do |nav_item|
content_li << content_tag(:li, nav_item)
end
content_tag :ul, content_li.html_safe
content_li.html_safe
end
def current_user

View File

@ -6,7 +6,7 @@
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") +
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
<%= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>

View File

@ -176,7 +176,7 @@
<tr>
<td><%= l(:label_bidding_user_homework) %> :
<% unless b_project.user.nil? %>
<%= link_to(b_project.user.lastname+b_project.user.firstname, user_path(b_project.user)) %>
<%= link_to(b_project.user.name, user_path(b_project.user)) %>
<% end %>
</td>
</tr>
@ -194,7 +194,7 @@
<%= l(:label_bidding_user) %>
<% end %>
<% unless b_project.user.nil? %>
<%= b_project.user.lastname %><%= b_project.user.firstname %>
<%= b_project.user.name %>
<% end %></strong>
<!-- added by bai 加入学号 -->
<p><strong>

View File

@ -1,73 +0,0 @@
<!--add by huang-->
<div class="clearfix"></div>
<<<<<<< HEAD
<div id="footer" style="margin-left:-5px;padding-top: 50px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;width: auto;margin-top: 80px;"></div>
<div class="base_footer">
<div align="center">
<!--gcm-->
<p>
<span>主办单位:</span>
<span class="footer_text_link"><%= link_to "国防科学技术大学并行与分布处理国家重点实验室","http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
<span class="footer_text_link"><%= link_to "计算机科学与技术系", "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
<span id="copyright">版权@2007~2014</span>
<span id="contact_us" class="footer_text_link"><%= link_to "联系我们","http://forge.trustie.net/projects/2/member",:target=>"_blank"%></span>
<span id="record"class="footer_text_link"><%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/"%></span>
</p>
<div id="logo_link">
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>"国防科学技术大学计算机学院"),"http://www.nudt.edu.cn/special.asp?classid=12"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>"北京大学信息科学技术学院软件研究所"), "http://eecs.pku.edu.cn"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>"北京航空航天大学计算机学院"), "http://scse.buaa.edu.cn/"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/iscas.png',:size=>'100x30',:alt=>"中国科学院软件研究所"), "http://www.iscas.ac.cn"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/inforbus.png',:size=>'100x30',:alt=>"山东中创软件商用中间件股份有限公司"), "http://www.inforbus.com"%></span>
</div>
<!--gcm-->
</div>
</div>
=======
<div id="footer" style="margin-left:-5px;padding-top: 150px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;"></div>
<div class="base_footer">
<div align="center">
<!--gcm-->
<p>
<span>主办单位:</span>
<span class="footer_text_link"><%= link_to "国防科学技术大学并行与分布处理国家重点实验室","http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
<span class="footer_text_link"><%= link_to "计算机科学与技术系", "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
<span id="copyright">版权@2007~2014</span>
<span id="contact_us" class="footer_text_link"><%= link_to "联系我们","http://forge.trustie.net/projects/2/member",:target=>"_blank"%></span>
<span id="record"class="footer_text_link"><%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/"%></span>
</p>
<div id="logo_link">
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>"国防科学技术大学计算机学院"),"http://www.nudt.edu.cn/special.asp?classid=12"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>"北京大学信息科学技术学院软件研究所"), "http://eecs.pku.edu.cn"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>"北京航空航天大学计算机学院"), "http://scse.buaa.edu.cn/"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/iscas.png',:size=>'100x30',:alt=>"中国科学院软件研究所"), "http://www.iscas.ac.cn"%></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/inforbus.png',:size=>'100x30',:alt=>"山东中创软件商用中间件股份有限公司"), "http://www.inforbus.com"%></span>
</div>
<!--gcm-->
</div>
</div>
>>>>>>> develop
</div>
</div>
<div class="debug">
<%= debug(params) if Rails.env.development? %>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46523987-1', 'trustie.net');
ga('send', 'pageview');
</script>
</div>

View File

@ -0,0 +1,84 @@
<%
request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil?
realUrl = request.original_url
if (realUrl.match(/forge\.trustie\.net\/*/))
@nav_dispaly_project_label = 1
@nav_dispaly_forum_label = 1
elsif (realUrl.match(/course\.trustie\.net\/*/))
@nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_course_label = nil
@nav_dispaly_store_all_label = 1
elsif (realUrl.match(/user\.trustie\.net\/*/))
@nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1
elsif (realUrl.match(/contest\.trustie\.net\/*/))
@nav_dispaly_contest_label = 1
@nav_dispaly_store_all_label = 1
else
@nav_dispaly_project_all_label = 1
@nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_bid_label = 1
@nav_dispaly_contest_label = 1
@nav_dispaly_store_all_label = 1
@nav_dispaly_user_label = 1
end
%>
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar">1</span>
<span class="icon-bar">2</span>
<span class="icon-bar">3</span>
</button>
<%=link_to image_tag("/images/logo5.png", class: 'navbar-brand', style:"width: 50px; height: 50px; padding:4px"), '/' %>
<a class="navbar-brand hidden" href="#">Trustie</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<%= bootstrap_render_dynamic_nav if User.current.logged? || !Setting.login_required? -%>
<li class="dropdown hidden">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left hidden" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right <%= "hidden" unless User.current.logged? %>">
<%= bootstrap_render_menu :account_menu -%>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=User.current%> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, {:class => 'my-message'} if User.current.logged? -%></li>
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li>
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li>
<li class="divider"></li>
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li>
</ul>
</li>
</ul>
</div>
</nav>

View File

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="<%= current_language %>">
<head>
<meta charset="utf-8"/>
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>"/>
<meta name="keywords" content="issue,bug,tracker"/>
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min" %>
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable' %>
<%= heads_for_theme %>
<%= bootstrap_head %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%= render :partial => 'layouts/bootstrap_base_header' %>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%= render :partial => 'layouts/base_footer' %>
</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
<div id="ajax-modal" style="display:none;"></div>
</div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -72,11 +72,9 @@
<% else %>
<%= content_tag('span', "#{l(:default_role_manager)}: ") %>
<% end %>
<!-- end -->
<!-- <%= content_tag('span', "#{l(:default_role_manager)}: ") %> -->
<% @admin = @project.project_infos%>
<% if @admin.size > 0 %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.name, user_path(u.user_id))}.join(", ").html_safe) %>
<% end %>
<% if(@project.project_type==1)%>
&nbsp;&nbsp;&nbsp;<%= l(:label_course_college) %>

View File

@ -28,22 +28,23 @@
</div>
<% if User.current.logged? %>
<table border="0" width="525px" align="center" >
<tr>
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td>
</tr>
</table>
<%= f.text_field :reference_user_id, :style=>"display:none"%> <!--what function?-->
<!-- modified by bai -->
<table border="0" width="518px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
<%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
</tr>
</table>
<!-- end -->
<% unless User.current.id == @softapplication.user_id %>
<table border="0" width="525px" align="center" >
<tr>
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td>
</tr>
</table>
<%= f.text_field :reference_user_id, :style=>"display:none"%> <!--what function?-->
<!-- modified by bai -->
<table border="0" width="518px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
<%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
</tr>
</table>
<% end %>
<% else %>
<div style="font-size: 14px;margin:10px;">
<%= l(:label_user_login_score_and_comment) %>

View File

@ -1,12 +0,0 @@
<h3><%=l(:label_release_softapplication)%></h3>
<!-- <%= render 'form' %>
<%= link_to 'Back', softapplications_path %> -->
<%= labelled_form_for @softapplication, :url => {:controller => 'softapplications', :action => 'create'}, method: :post do |f| %>
<div class="box tabular">
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>
</div>

View File

@ -1,12 +0,0 @@
<h3><%=l(:label_release_softapplication)%></h3>
<!-- <%= render 'form' %>
<%= link_to 'Back', softapplications_path %> -->
<%= labelled_form_for @softapplication, :url => {:controller => 'softapplications', :action => 'create'}, method: :post do |f| %>
<div class="box tabular">
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<!-- <%= javascript_tag "$('#bid_name').focus();" %> -->
<% end %>
</div>

View File

@ -1,64 +0,0 @@
<h3><%= l(:label_release_softapplication)%></h3> <!-- <%= render 'form' %>
<%= link_to 'Back', softapplications_path %> -->
<div id="put-bid-form" style="">
<%= form_for Softapplication.new, :url => {:controller => 'softapplications', :action => 'create'}, :update => "bidding_project_list", :complete => '$("#put-bid-form").hide();', :html => {:multipart => true, :id => 'add_homework_form'} do |f| %>
<fieldset>
<legend>
<%= l(:label_attachment_plural) %>
</legend>
<tr style="width:700px; margin-left: -10px">
<td><%= l(:label_softapplication_name) %></td>
<td style="require, color: #bb0000"> * </td>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
<td><%= l(:label_softapplication_name_condition)%></td>
</tr></ br>
<br />
<br />
<tr style="width:800px;">
<td><%= l(:label_softapplication_version_available) %></td>
<td style="require, color: #bb0000"> * </td>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
</tr></ br>
<br />
<br />
<tr style="width:800px;">
<td><%= l(:label_softapplication_type) %></td>
<td style="require, color: #bb0000"> * </td>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
</tr></ br>
<br />
<br />
<tr style="width:800px;">
<td><%= l(:label_softapplication_description) %></td>
<td style="require, color: #bb0000"> * </td>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
</tr></ br>
<br />
<br />
<%= render_flash_messages %>
<p id="put-bid-form-partial">
<%= render :partial => 'attachments/form' %>
</p>
</fieldset>
<%= submit_tag l(:button_create), :onclick => "return true" %>
<script type="text/javascript">
function j_submit () {
alert('start')
var submit_homework = function(){
$('#add_homework_form').clone().attr('action', '<%= url_for({:controller => "softapplications", :action => "create"})+".js" %>').ajaxSubmit()
};
alert('stop')
$.globalEval(submit_homework());
return false;
}
</script>
</div>
<% end %>
</div>

View File

@ -120,8 +120,10 @@
<div style="height: 50px">
<div style="font-size: 15px"><strong>作品评论:</strong></div>
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
<% if (User.current.logged? and User.current.id != @softapplication.user_id) %>
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
<% end %>
</div>

View File

@ -1,158 +0,0 @@
<%= render :partial => 'layouts/base_softapplication_top_content' %>
<div style="height: auto; padding-bottom: 10px">
<tr>
<td colspan="2" valign="top" width="320">
</td>
<td>
<table width="100%" border="0">
<tr style="font-size: 18px">
<td colspan="2" valign="top"><strong><%= @softapplication.name %></strong></td>
<td style="font-size: 15px; padding-left: 0px">
<%= link_to '删除', softapplication_path(@softapplication), method: :delete, data: {confirm: '您确定要删除吗?'} if @softapplication.destroyable_by? User.current %>&nbsp;
<%= link_to '编辑', edit_softapplication_path(@softapplication), method: :get if @softapplication.destroyable_by? User.current %>
</td>
</tr>
<tr>
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">所属类别:<%= @softapplication.app_type_name %></td>
<% contest = @softapplication.contests.first %>
<td style="width: 240px; word-wrap: break-word; word-break: break-all">所属竞赛:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
</tr>
<tr>
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
</tr>
<tr>
<td style="padding-left: 40px">
<span>作品下载:</span>
<span>
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
</span>
<<<<<<< HEAD
</td>
=======
</td>
<td>开发人员:<%= @softapplication.application_developers %></td>
</tr>
<tr>
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
<td>发布时间:<%=format_time @softapplication.created_at %></td>
</tr>
<tr>
<td style="padding-left: 40px">
<% if (@softapplication.deposit_project != "nil" && @softapplication.deposit_project != "") %>
<%#= textilizable ("托管项目: " + @project.name) %>
托管项目:<%= link_to "#@project", project_path(@project.id) %>
<% end %>
</td>
</tr>
>>>>>>> 2f709c92ba93d46c81adc49fac0d77584018a3fe
<td>开发人员:<%= @softapplication.application_developers %></td>
</tr>
<tr>
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
<td>发布时间:<%= format_time @softapplication.created_at %></td>
</tr>
<tr>
<td style="padding-left: 40px">
<% unless @softapplication.deposit_project_url.nil? %>
<%= textilizable ("托管项目网址: " + @softapplication.deposit_project_url) %>
<% end %>
</td>
</tr>
</table>
</td>
</tr>
</div>
<div class="underline-contests_one"></div>
<div style="height: auto; padding-bottom: 10px">
<strong>
<div style="font-size: 15px;">作品简介:</div>
</strong>
<div style="padding-top: 5px"><%= @softapplication.description %></div>
</div>
<div class="underline-contests_one"></div>
<div style="height: auto; padding-bottom: 10px">
<div style="font-size: 15px;"><strong>作品得分:</strong></div>
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
<div style="overflow: hidden">
<div style="margin-left: 15%; float: left">
<div style="padding-left: 45px; padding-bottom: 5px">得分比例</div>
<div>
<% 100.step(20, -20) do |star| %>
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">
<div class="jRatingColor" style="width: <%=star%>%;"></div>
<div class="jRatingAverage" style="width: 0px; top: -20px;"></div>
<div class="jStar" style="width: 115px; height: 20px; top: -40px; background: url(/images/seems_rateable/stars.png) repeat-x scroll 0% 0% transparent;">
</div>
</div>
<%= @stars_status_map["star#{(star/20).to_s}".to_sym] %>
<br>
<% end %>
</div>
</div>
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
<div>最终得分</div>
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
</div>
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
</div>
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
<div>打分总人数</div>
<div style="padding-top: 1px; font-size: 25px; color: blue;">
<strong><%= @softapplication.raters(:quality).count %></strong></div>
</div>
</div>
</div>
<div class="underline-contests_one"></div>
<div style="height: auto; padding-bottom: 10px">
<strong>
<div style="font-size: 15px">作品截图:</div>
</strong>
<div class="softapplication-img" >
<ul>
<% @image_results.take(4).each do |attachment| %>
<li>
<div class="title"><a href="#"><%= attachment.filename.to_s -%></a></div>
<%= link_to_attachment_img attachment, :class => "soft-application", :download => "true"%>
</li>
<% end %>
</ul>
</div>
<div style='clear :left;'></div>
</div>
<div class="underline-contests_one"></div>
<div style="height: 50px">
<div style="font-size: 15px"><strong>作品评论:</strong></div>
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
</div>
<!--提示登录后对应用进行评价-->
<div id="history">
<%= render :partial => 'message_history', :locals => {:contest => @softapplication, :journals => @jour, :state => false} %>
</div>
<!--分页-->
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
</ul>
</div>
<div>
</div>

View File

@ -1,100 +1,100 @@
<script type="text/javascript">
// $(this).ready(function(){
// $('.tag_show').hover(function() {
// $(this).children("span").show();
// }, function() {
// $(this).children("span").hide();
// });
// })
// $(this).ready(function(){
// $('.tag_show').hover(function() {
// $(this).children("span").show();
// }, function() {
// $(this).children("span").hide();
// });
// })
</script>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求-->
<% @tags = obj.reload.tag_list %>
<% if non_list_all and (@tags.size > 0) %>
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
<% if @tags.size > Setting.show_tags_length.to_i then %>
<% i = 0 %>
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
<% if @tags.size > Setting.show_tags_length.to_i then %>
<% i = 0 %>
<% until i>Setting.show_tags_length.to_i do %>
<div id="tag">
<%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %>
</div>
<% i += 1%>
<% end %>
<% until i>Setting.show_tags_length.to_i do %>
<div id="tag">
<%= link_to @tags[i], :controller => "tags", :action => "index", :q => @tags[i], :object_flag => object_flag, :obj_id => obj.id %>
</div>
<% i += 1 %>
<% end %>
<%= link_to l(:label_more_tags),:action => "show",:id => obj.id %>
<%= link_to l(:label_more_tags), :action => "show", :id => obj.id %>
<% else %>
<% @tags.each do |tag| %>
<div id="tag">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
</div>
<% end %>
<% end %>
<% else %>
<% @tags.each do |tag| %>
<div id="tag">
<%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id %>
</div>
<% end %>
<% end %>
<% else %>
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<div id="tag">
<span class="tag_show"> <%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>
<% when '1'%>
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<div id="tag">
<span class="tag_show"> <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>
<% when '1' %>
<% if User.current.eql?(obj) %>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '2' %>
<% if (ProjectInfo.find_by_project_id(obj.id)).user_id == User.current.id %>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '3' %>
<% if (ProjectInfo.find_by_project_id(obj.project_id)).user_id == User.current.id %>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '4'%>
<% when '4' %>
<% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '6'%>
<% if ( User.current.logged? &&
User.current.admin?
# && (@project && User.current.member_of?(@project))
)
%>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<% when '6' %>
<% if (User.current.logged? &&
User.current.admin?
# && (@project && User.current.member_of?(@project))
)
%>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '7'%>
<% when '7' %>
<% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
:taggable_id => obj.id,:taggable_type => object_flag %> </span>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% end %>
</span>
</div>
<% end %>
<% else %>
<span style="color:#8c8a8a">
</div>
<% end %>
<% else %>
<span style="color:#8c8a8a">
&nbsp;&nbsp;&nbsp;<%= l(:label_tags_no) %>
</span>
<% end %>
<% end %>
<% end %>

View File

@ -1443,6 +1443,7 @@ en:
label_identity: Identity
label_teacher: Teacher
label_student: Student
label_school_all: Schools
label_other: Other
label_gender: Gender
label_gender_male: male

View File

@ -94,6 +94,18 @@ module Redmine
links.empty? ? nil : content_tag('ul', links.join("\n").html_safe)
end
def bootstrap_render_menu(menu, project=nil)
links = []
menu_items_for(menu, project) do |node|
links << render_menu_node(node, project)
end
s = ''
# s = "<ul class = 'nav navbar-nav navbar-right'> "
s << links.join("\n")
# s << "</ul>"
links.empty? ? nil : s.html_safe
end
def render_menu_node(node, project=nil)
if node.children.present? || !node.child_menus.nil?
return render_menu_node_with_children(node, project)

BIN
public/images/logo5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long