Merge branch 'szzh' into develop

course_group v20140909
sw 11 years ago
commit 3b4e41c059

@ -180,9 +180,10 @@ class AttachmentsController < ApplicationController
end end
respond_to do |format| respond_to do |format|
# modify by nwb
if !@attachment.container.nil? && if !@attachment.container.nil? &&
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) && @attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) && @attachment.container.board && @attachment.container.board.course ) ) (@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
@attachment.container.board && @attachment.container.board.course ) )
if @attachment.container.is_a?(News) if @attachment.container.is_a?(News)
format.html { redirect_to_referer_or news_path(@attachment.container) } format.html { redirect_to_referer_or news_path(@attachment.container) }
elsif @attachment.container.is_a?(Message) elsif @attachment.container.is_a?(Message)

@ -156,17 +156,17 @@ class MessagesController < ApplicationController
@subject = @message.subject @subject = @message.subject
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " @content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
#@temp = Message.new
##@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
#@content_html = textilizable(@content)
#@temp.content = @content_html
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> &nbsp; "
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
@content = "<blockquote>" << @content
@temp = Message.new @temp = Message.new
@temp.content = @content #@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
@content_html = textilizable(@content)
@temp.content = @content_html
#@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> &nbsp; "
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
#@content = "<blockquote>" << @content
#@temp = Message.new
#@temp.content = @content
end end

@ -836,7 +836,7 @@ class ProjectsController < ApplicationController
format.api { render_api_ok } format.api { render_api_ok }
end end
else else
render :layout => "base" render :layout => "project_base"
end end
# hide project in layout # hide project in layout
@project = nil @project = nil

@ -372,7 +372,7 @@ class RepositoriesController < ApplicationController
def revision def revision
respond_to do |format| respond_to do |format|
format.html format.html{render :layout => 'project_base'}
format.js {render :layout => false} format.js {render :layout => false}
end end
end end

@ -107,7 +107,7 @@ class VersionsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
flash[:notice] = l(:notice_successful_create) flash[:notice] = l(:notice_successful_create)
redirect_back_or_default settings_project_path(@project, :tab => 'versions') redirect_to settings_project_path(@project, :tab => 'versions')
end end
format.js format.js
format.api do format.api do

@ -173,25 +173,14 @@ module ProjectsHelper
# Renders the projects index # Renders the projects index
def render_project_hierarchy(projects) def render_project_hierarchy(projects)
render_project_nested_lists(projects) do |project| render_project_nested_lists(projects) do |project|
#Modified by young if (project.try(:project_type) == Project::ProjectType_course )
if (project.try(:project_type) == Project::ProjectType_course ) s = project.is_public == 1 ? "".html_safe : "<span class='private_project'>#{l(:label_private)}</span>".html_safe
unless project.is_public == 1 s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}").html_safe
s = "<span class='private_project'>#{l(:lable_private)}</span>".html_safe else
else s = project.is_public ? "".html_safe : "<span class='private_project'>#{l(:label_private)}</span>".html_safe
s = "".html_safe s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
end end
s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}").html_safe
else
unless project.is_public
s = "<span class='private_project'>#{l(:lable_private)}</span>".html_safe
else
s = "".html_safe
end
s += link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
end
#Ended by young
if project.description.present? if project.description.present?
#Delete by nie.
# s << content_tag('td', textilizable(project.short_description, :project => project), :class => 'wiki description') # s << content_tag('td', textilizable(project.short_description, :project => project), :class => 'wiki description')
end end
s s

@ -12,7 +12,7 @@ class ProjectStatus < ActiveRecord::Base
# 但是 如果超级用户删除其他用户的话会造成读取错误 这里是遗漏点 # 但是 如果超级用户删除其他用户的话会造成读取错误 这里是遗漏点
# 删除用户时 此表创建人员未作相应删除动作 # 删除用户时 此表创建人员未作相应删除动作
def update_watchers_count(num) def update_watchers_count(num)
if self.watchers_count >= 0 if self.watchers_count||0 >= 0
self.update_attribute(:watchers_count, self.watchers_count.to_i + num) self.update_attribute(:watchers_count, self.watchers_count.to_i + num)
end end
end end

@ -27,7 +27,7 @@
<span class="add_attachment"> <span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%--> <!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> <%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
<%= file_field_tag 'attachments[dummy][file]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',
:class => 'file_selector', :class => 'file_selector',

@ -6,8 +6,8 @@
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> <p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp <span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp
<span class="size"> <span class="size">
<!-- --> <% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage') &&
<% if @attachment!=nil &&(@attachment.container_type == 'Document' || @attachment.container_type == 'WikiPage')&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %>
<%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review', <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review',
:action => 'assign', :action_type => 'attachment', :action => 'assign', :action_type => 'attachment',
:id=>@attachment.project, :id=>@attachment.project,

@ -166,7 +166,7 @@
<%= render :partial => 'attachments/form' %> <%= render :partial => 'attachments/form' %>
</p> </p>
<p style="font-size: 11px"> <p style="font-size: 11px;line-height:normal;">
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/> 1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
<br> <br>
2、<%= l(:label_upload_softapplication_photo_condition) %> 2、<%= l(:label_upload_softapplication_photo_condition) %>

@ -11,7 +11,7 @@
<p > <p >
<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%> <%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%>
<% unless @course.is_public == 1 %> <% unless @course.is_public == 1 %>
<span class='private_project'><%= l(:lable_private) %></span> <span class='private_project'><%= l(:label_private) %></span>
<% end %> <% end %>
<%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%> <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%>
</p> </p>

@ -37,7 +37,7 @@
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <!-- <td class="created_on"><%#= format_time(file.created_on) %></td> -->
<td class="filesize"><%= number_to_human_size(file.filesize) %></td> <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="attach_type"> <td class="attach_type">
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %></span> <span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %></span>
&nbsp; &nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, <%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes,

@ -37,7 +37,7 @@
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> --> <!-- <td class="created_on"><%#= format_time(file.created_on) %></td> -->
<td class="filesize"><%= number_to_human_size(file.filesize) %></td> <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="attach_type"> <td class="attach_type">
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:lable_unknow_type):file.attachmentstype.typeName %></span> <span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.nil? ? l(:label_unknow_type):file.attachmentstype.typeName %></span>
&nbsp; &nbsp;
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;"> <span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,

@ -21,7 +21,7 @@
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script> <script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
<%= f.text_area :description, :required => true, :id => 'editor01' %> <%= f.text_area :description, :required => true, :id => 'editor01' %>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01',{height:300});</script> <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01',{height:300});</script>
<p style="color: #ff0000">(<%= l(:lable_forums_max_length) %>)</p> <p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p>
</div> </div>
<div class="actions" style=" padding-top: 10px; float:right"> <div class="actions" style=" padding-top: 10px; float:right">
<%= submit_tag l(:button_submit) %> <%= submit_tag l(:button_submit) %>

@ -18,7 +18,7 @@
<p><%= f.text_field :subject, :required => true%></p> <p><%= f.text_field :subject, :required => true%></p>
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p> <p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script> <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
<p style="color: #ff0000">(<%= l(:lable_memos_max_length) %>)</p> <p style="color: #ff0000">(<%= l(:label_memos_max_length) %>)</p>
<p> <p>
<%= l(:label_attachment_plural) %><br /> <%= l(:label_attachment_plural) %><br />

@ -45,6 +45,6 @@
</div> </div>
</div> </div>
<%= call_hook :view_layouts_base_body_bottom %> <!--<#%= call_hook :view_layouts_base_body_bottom %>-->
</body> </body>
</html> </html>

@ -157,7 +157,7 @@
<td class="comments"> <td class="comments">
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"> <div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<%= textAreailizable message,:content,:attachments => message.attachments %> <%= textilizable message,:content,:attachments => message.attachments %>
<%#= message.content.html_safe %> <%#= message.content.html_safe %>
</div> </div>
<%= link_to_attachments message, :author => false %> </td> <%= link_to_attachments message, :author => false %> </td>

@ -23,6 +23,7 @@
<% end %> <% end %>
</p> </p>
<p><label for="message_subject"><%= l(:field_description) %><span class="required"> *&nbsp;&nbsp;</span></label> <p><label for="message_subject"><%= l(:field_description) %><span class="required"> *&nbsp;&nbsp;</span></label>
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
<%= text_area :quote,:quote,:style => 'display:none' %> <%= text_area :quote,:quote,:style => 'display:none' %>
</p> </p>
<p> <p>

@ -163,7 +163,7 @@
<tr> <tr>
<td class="comments"> <td class="comments">
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"> <div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<%= textAreailizable message,:content,:attachments => message.attachments %> <%= textilizable message,:content,:attachments => message.attachments %>
<%#= message.content.html_safe %> <%#= message.content.html_safe %>
</div> </div>
<%= link_to_attachments message, :author => false %> </td> <%= link_to_attachments message, :author => false %> </td>

@ -69,7 +69,7 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %> <%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
<%#= submit_tag l(:button_save) %> <%#= submit_tag l(:button_save) %>
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %> <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
<%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> | <%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %> <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
<% end %> <% end %>

@ -49,6 +49,12 @@
$("#news-form").submit(); $("#news-form").submit();
} }
} }
function submitFocus(obj)
{
$(obj).focus();
}
</script> </script>
<% <%
@ -76,7 +82,7 @@
:html => {:id => 'news-form', :multipart => true} do |f| %> :html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/form', :locals => {:f => f} %> <%= render :partial => 'news/form', :locals => {:f => f} %>
<%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit --> <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit -->
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :class => 'whiteButton m3p10' %> <%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
| |
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %> <%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
| |

@ -49,6 +49,7 @@
$("#news-form").submit(); $("#news-form").submit();
} }
} }
</script> </script>
<div class="contextual"> <div class="contextual">
<%= watcher_link(@news, User.current) %> <%= watcher_link(@news, User.current) %>
@ -68,7 +69,7 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %> <%= render :partial => 'form', :locals => { :f => f } %>
<%#= submit_tag l(:button_save) %> <%#= submit_tag l(:button_save) %>
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %> <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> | <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %> <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
<% end %> <% end %>

@ -82,7 +82,7 @@
<% end %> <% end %>
<%= content_tag('span', link_to(files_count, file_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %> <%= content_tag('span', link_to(files_count, file_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %>
</p> </p>
</div> </div>
<% end %> <% end %>
@ -114,19 +114,19 @@
<% if(@project.project_type==1)%> <% if(@project.project_type==1)%>
&nbsp;&nbsp;&nbsp;<%= l(:label_course_college) %> &nbsp;&nbsp;&nbsp;<%= l(:label_course_college) %>
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
<%= @admin.first.user.user_extensions.occupation %> <%= @admin.first.user.user_extensions.occupation %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<div class="licences"> <div class="licences">
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %> <%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
</div> </div>
<!-- added by bai --> <!-- added by bai -->
<div class="grade"> <div class="grade">
<% if @project.project_type !=1 %> <% if @project.project_type !=1 %>
<%= l(:label_project_grade)%>: <%= l(:label_project_grade)%>:
<span > <span >
<%= link_to(format("%.2f" , red_project_scores(@project) ).to_i, <%= link_to(format("%.2f" , red_project_scores(@project) ).to_i,
{:controller => 'projects', {:controller => 'projects',
@ -138,7 +138,7 @@
<!-- end --> <!-- end -->
<!-- added by liuping --> <!-- added by liuping -->
</span> </span>
</div> </div>

@ -1,4 +1,3 @@
<!-- added by bai -->
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -16,7 +15,7 @@
<!-- page specific tags --> <!-- page specific tags -->
<%= yield :header_tags -%> <%= yield :header_tags -%>
</head> </head>
<% if @project %>
<h3 class="title"><%= l(:label_projects_score) %></h3> <h3 class="title"><%= l(:label_projects_score) %></h3>
<div class="inf_user_image"> <div class="inf_user_image">
<table style="border-bottom: solid 1px #80a6d2;" width="100%"> <table style="border-bottom: solid 1px #80a6d2;" width="100%">
@ -54,7 +53,7 @@
</li> </li>
<li> <li>
<%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> :
<%= format("%.2f" , document_score(@project)).to_i %> <%= format("%.2f" , documents_score(@project)).to_i %>
</li> </li>
<li> <li>
<%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> :
@ -69,4 +68,4 @@
<div id="show_score_detail"> <div id="show_score_detail">
<%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %> <%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %>
</div> </div>
<!-- end --> <% end %>

@ -20,7 +20,7 @@
:rev => nil}, :rev => nil},
:method => :get) do %> :method => :get) do %>
<%= text_field_tag 'rev', @rev, :size => 8 %> <%= text_field_tag 'rev', @rev, :size => 8 %>
<%= submit_tag 'OK', :name => nil %> <%= submit_tag l(:label_button_ok), :name => nil %>
<% end %> <% end %>
</div> </div>

@ -5,7 +5,7 @@
:method => :get :method => :get
) do %> ) do %>
<%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %> <%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %>
<%= submit_tag 'OK' %> <%= submit_tag l(:label_button_ok) %>
<% end %> <% end %>
</div> </div>

@ -112,7 +112,7 @@
<p id="put-bid-form-partial"> <p id="put-bid-form-partial">
<%= render :partial => 'attachments/form' %> <%= render :partial => 'attachments/form' %>
</p> </p>
<p style="font-size: 10px">1、<%=l(:label_upload_softapplication_packets_mustpacketed)%><br>2、<%=l(:label_upload_softapplication_photo_condition)%></p> <p style="font-size: 10px;">1、<%=l(:label_upload_softapplication_packets_mustpacketed)%><br>2、<%=l(:label_upload_softapplication_photo_condition)%></p>
<!-- p style="font-size: 10px; color: red"><%#=l(:label_updated_caution)%></p--> <!-- p style="font-size: 10px; color: red"><%#=l(:label_updated_caution)%></p-->
</fieldset> </fieldset>

@ -1,5 +1,5 @@
<!-- added by bai -->
<% option_num = get_option_number(@user,1) %>
<div><%= l(:label_user_score) %></div> <div><%= l(:label_user_score) %></div>
<div> = <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> + <div> = <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> +
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %></div> <%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %></div>
@ -7,8 +7,8 @@
<div> = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %> <div> = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
+ <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %></div> + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %></div>
<% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %> <% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %>
<div><%= l(:lable_score_less_than_zero) %></div> <div><%= l(:label_score_less_than_zero) %></div>
<% else %> <% else %>
<div> = <%= format("%.2f" ,option_num.total_score).to_i %></div> <div> = <%= format("%.2f" ,option_num.total_score).to_i %></div>
<% end %> <% end %>
<!-- end -->

@ -7,7 +7,7 @@
<div class='desc_item'> <div class='desc_item'>
<span class=''> <span class=''>
<% unless course.is_public == 1 %> <% unless course.is_public == 1 %>
<span class="private_project"><%= l(:lable_private) %></span> <span class="private_project"><%= l(:label_private) %></span>
<% end %> <% end %>
<%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> <%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>

@ -92,7 +92,7 @@
<% if User.current.logged? %> <% if User.current.logged? %>
<li> <li>
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:lable_school_no_course)} %> <%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_no_course)} %>
</li> </li>
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9, @school_id)} %> <%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9, @school_id)} %>
<% else %> <% else %>
@ -115,7 +115,7 @@
<%= render :partial => 'course_list', :locals => {:course_list => school_course} %> <%= render :partial => 'course_list', :locals => {:course_list => school_course} %>
<% if school_course.count < 10 %> <% if school_course.count < 10 %>
<li> <li>
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:lable_school_less_course)} %> <%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
</li> </li>
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9 - school_course.count, @school_id)} %> <%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9 - school_course.count, @school_id)} %>
<% end %> <% end %>

@ -73,7 +73,7 @@
<!-- 上左下右 --> <!-- 上左下右 -->
<div style="float: left; margin-left: 10px; width: 380px;"> <div style="float: left; margin-left: 10px; width: 380px;">
<% unless project.is_public %> <% unless project.is_public %>
<span class="private_project"><%= l(:lable_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 "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)

@ -1807,7 +1807,14 @@ en:
label_company_name: Company Name label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation notice_account_invalid_creditentials_new: You have not to the mailbox activation
lable_unknow_type: Unknow type label_school_no_course: The school did not offer any courses, you can view other school curriculum
lable_score_less_than_zero: Score less than 0, revised to 0 label_school_less_course: The school offers courses in less, you can view other school curriculum
label_file_not_found: Sorry, the file can't be downloaded now!
label_goto_homepage: Return to the home page
label_trustie_team: The Trustie development team
label_memos_max_length: The content of the post up to 65535 characters in length
label_forums_max_length: Post Bar describing the maximum length of 65535 characters
label_unknow_type: Unknow type
label_score_less_than_zero: Score less than 0, revised to 0
review_assignments: review assignments review_assignments: review assignments
lable_private: private label_private: private

@ -2106,16 +2106,16 @@ zh:
modal_valid_passing: 可以使用 modal_valid_passing: 可以使用
label_bug: 漏洞 label_bug: 漏洞
lable_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程 label_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程
lable_school_less_course: 该学校开设课程较少,您可以查看其他学校课程 label_school_less_course: 该学校开设课程较少,您可以查看其他学校课程
lable_file_not_found: 对不起,该文件现在不能下载! label_file_not_found: 对不起,该文件现在不能下载!
lable_goto_homepage: 返回主页 label_goto_homepage: 返回主页
lable_trustie_team: Trustie开发团队 label_trustie_team: Trustie开发团队
lable_memos_max_length: 帖子内容最大长度为65535个字符 label_memos_max_length: 帖子内容最大长度为65535个字符
lable_forums_max_length: 贴吧描述最大长度为65535个字符 label_forums_max_length: 贴吧描述最大长度为65535个字符
lable_unknow_type: 未知类型 label_unknow_type: 未知类型
lable_score_less_than_zero: 得分小于0修正为0 label_score_less_than_zero: 得分小于0修正为0
review_assignments: 评审任务 review_assignments: 评审任务
lable_private: 私有 label_private: 私有

@ -437,9 +437,9 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.string "web_title" t.string "web_title"
t.string "title" t.string "title"
t.text "description" t.text "description"
t.string "page_type"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "page_type"
t.integer "sort_type" t.integer "sort_type"
t.integer "show_course", :default => 1 t.integer "show_course", :default => 1
t.integer "show_contest", :default => 1 t.integer "show_contest", :default => 1
@ -458,26 +458,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "gitlab_projects", :force => true do |t|
t.integer "gitlab_project_id"
t.integer "project_id"
t.string "repository_url"
t.string "web_url"
t.string "localfile_url"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "gitlab_users", :force => true do |t|
t.integer "gitlab_user_id"
t.integer "user_id"
t.string "email"
t.string "password"
t.string "login", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "groups_users", :id => false, :force => true do |t| create_table "groups_users", :id => false, :force => true do |t|
t.integer "group_id", :null => false t.integer "group_id", :null => false
t.integer "user_id", :null => false t.integer "user_id", :null => false

@ -26,12 +26,12 @@
<body> <body>
<div class="container" > <div class="container" >
<!--<h1>Sorry, this file can not be downloaded now. </h1>--> <!--<h1>Sorry, this file can not be downloaded now. </h1>-->
<h1><%= l(:lable_file_not_found) %></h1> <h1><%= l(:label_file_not_found) %></h1>
<h3> <a href="http://forge.trustie.net" style=""><%= l(:lable_goto_homepage) %></a> </h3> <h3> <%= link_to l(:label_goto_homepage),{:controller=>'welcome',:action=>'index',:host=>Setting.host_name} %> </h3>
<div class="container" style=""> <div class="container" style="">
<div style="position: relative; right:0;text-align: right;"> <div style="position: relative; right:0;text-align: right;">
<h4><%= l(:lable_trustie_team) %></h4> <h4><%= l(:label_trustie_team) %></h4>
</div> </div>
</div> </div>
<p class="hidden" > <p class="hidden" >

@ -1350,7 +1350,8 @@ tr.message.locked td.subject { background: url(../images/locked.png) no-repeat 0
tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; } tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; }
tr.version.closed, tr.version.closed a { color: #999; } tr.version.closed, tr.version.closed a { color: #999; }
tr.version td.name { padding-left: 20px; } tr.version td.name { padding-left: 20px;word-break: break-all; }
tr.version td.description{word-break: break-all}
tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; } tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; } tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }
@ -1636,7 +1637,7 @@ fieldset#filters td.field { width:230px; }
fieldset#filters td.operator { width:180px; } fieldset#filters td.operator { width:180px; }
fieldset#filters td.operator select {max-width:170px;} fieldset#filters td.operator select {max-width:170px;}
fieldset#filters td.values { white-space:nowrap; } fieldset#filters td.values { white-space:nowrap; }
fieldset#filters td.values select {min-width:130px;max-width: 220px;} fieldset#filters td.values select {min-width:130px;max-width: 100px;}
fieldset#filters td.values input {height:1em;} fieldset#filters td.values input {height:1em;}
fieldset#filters td.add-filter { text-align: right; vertical-align: top; } fieldset#filters td.add-filter { text-align: right; vertical-align: top; }

Loading…
Cancel
Save