Merge branch 'szzh' into develop

This commit is contained in:
sw 2014-08-16 13:33:07 +08:00
commit 2b12654796
30 changed files with 245 additions and 155 deletions

View File

@ -725,6 +725,12 @@ class ApplicationController < ActionController::Base
#查找首页相关信息
def find_first_page
@first_page = FirstPage.where("page_type = 'project'").first
if @first_page.nil?
@first_page = FirstPage.new
@first_page.page_type = 'project'
@first_page.description = ""
@first_page.save()
end
@show_course = @first_page.show_course
@show_contest = @first_page.show_contest
end

View File

@ -17,7 +17,7 @@
class TrackersController < ApplicationController
layout 'admin'
helper "project_score"
before_filter :require_admin, :except => :index
before_filter :require_admin_or_api_request, :only => :index
accept_api_auth :index
@ -38,6 +38,7 @@ class TrackersController < ApplicationController
@tracker ||= Tracker.new(params[:tracker])
@trackers = Tracker.sorted.all
@projects = Project.all
@courses = Course.all
end
def create

View File

@ -295,8 +295,8 @@ class UsersController < ApplicationController
# 活跃度排序, 就是所谓的得分情况
@s_type = 1
@users = scope.
joins("LEFT JOIN user_scores ON users.id = user_scores.user_id").
reorder('user_scores.active DESC')
joins("LEFT JOIN option_numbers ON users.id = option_numbers.user_id and option_numbers.score_type = 1").
reorder('option_numbers.total_score DESC')
when '2'
# 粉丝数排序
@s_type = 2
@ -308,8 +308,8 @@ class UsersController < ApplicationController
# 默认活跃度排序
@s_type = 1
@users = scope.
joins("LEFT JOIN user_scores ON users.id = user_scores.user_id").
reorder('user_scores.active DESC')
joins("LEFT JOIN option_numbers ON users.id = option_numbers.user_id and option_numbers.score_type = 1").
reorder('option_numbers.total_score DESC')
end
# limit and offset

View File

@ -20,11 +20,12 @@ class WelcomeController < ApplicationController
include WelcomeHelper
helper :project_score
caches_action :robots
before_filter :find_first_page, :only => [:index]
# before_filter :fake, :only => [:index, :course]
before_filter :entry_select, :only => [:index]
def index
@first_page = FirstPage.where("page_type = 'project'").first
#@first_page = FirstPage.where("page_type = 'project'").first
#@show_course = @first_page.show_course
if @first_page.nil? || @first_page.sort_type.nil?
@projects = find_miracle_project(10, 3,"score desc")
@ -76,7 +77,7 @@ class WelcomeController < ApplicationController
logo = get_avatar?(@course_page)
id = params[:school_id]
logo_link = ""
if id.nil? && User.current.user_extensions.school.nil?
if id.nil? && (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?)
if logo
logo_link = url_to_avatar(@course_page)
else
@ -148,8 +149,8 @@ class WelcomeController < ApplicationController
private
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
def entry_select
@first_page = FirstPage.where("page_type = 'project'").first
url = request.original_url
#@first_page = FirstPage.where("page_type = 'project'").first
url = request.original_url.gsub('/','')
if url.include?(Setting.host_course)
if @first_page.show_course == 1
course

View File

@ -54,7 +54,7 @@ class ZipdownController < ApplicationController
end
rescue => e
render file: 'public/file_not_found.html'
render file: 'public/file_not_found.html' , :layout => 'course_base'
end
private

View File

@ -31,6 +31,7 @@ module MembersHelper
}
s + content_tag('div', content_tag('ul', links), :class => 'pagination_new')
end
# add by nwb

View File

@ -12,6 +12,8 @@ module TagsHelper
@obj = Issue.find_by_id(obj_id)
when '4'
@obj = Bid.find_by_id(obj_id)
when '5'
@obj = Forum.find_by_id(obj_id)
when '6'
@obj = Attachment.find_by_id(obj_id)
when '7'
@ -44,6 +46,8 @@ module TagsHelper
if user.id == obj_id
@result = true
end
when '5'
@result = is_forum_manager?(user.id,obj_id)
when '7'
if user.id == obj_id
@result = true
@ -56,6 +60,17 @@ module TagsHelper
end
# 判断用户是否是贴吧的管理员
# add by chenmin
def is_forum_manager?(user_id,forum_id)
@result = false
@user_id = Forum.find(forum_id).creator_id;
if @user_id == user.id
@result = true
end
return @result
end
def tagname_val
("#tag_name_name").value
end

View File

@ -13,16 +13,17 @@
<% end %>
</span>
<script type='text/javascript'>
function CompatibleSend()
{
var obj=document.getElementById("_file");
var file= $(obj).clone();
file.click();
}
// function CompatibleSend()
// {
// var obj=document.getElementById("_file");
// var file= $(obj).clone();
// file.click();
// }
</script>
<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()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -30,7 +30,7 @@
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => 'delete',
:remote => true,
#:remote => true,
#:id => "attachments_" + attachment.id.to_s,
:title => l(:button_delete) %>
<% end %>

View File

@ -53,7 +53,7 @@
</span>
<% end %>
</div>
<div style="padding-top: 10px">
<div style="width: 100%;word-break: break-all;">
<% if @topics.any? %>
<!-- <table class="list messages">
<thead><tr>

View File

@ -1,12 +1,98 @@
<%#= error_messages_for 'softapplication' %>
<script type="text/javascript">
//验证作品名称
function regexName()
{
var name = $("#softapplication_name").val();
if(name.length ==0)
{
$("#spane_name_notice").text("作品名称不能为空");
$("#spane_name_notice").css('color','#ff0000');
$("#spane_name_notice").focus();
return false;
}
else if(name.length < 25)
{
$("#spane_name_notice").text("填写正确");
$("#spane_name_notice").css('color','#008000');
return true;
}
else
{
$("#spane_name_notice").text("作品名称超过25个汉字");
$("#spane_name_notice").css('color','#ff0000');
$("#spane_name_notice").focus();
return false;
}
}
//验证运行平台
function regexWorkdescription()
{
var workDescription = $("#softapplication_android_min_version_available").val();
if(workDescription.length ==0)
{
$("#spane_workdescription_notice").text("运行平台不能为空");
$("#spane_workdescription_notice").css('color','#ff0000');
return false;
}
if(workDescription.length < 125)
{
$("#spane_workdescription_notice").text("填写正确");
$("#spane_workdescription_notice").css('color','#008000');
return true;
}
else
{
$("#spane_workdescription_notice").text("运行平台超过125个汉字");
$("#spane_workdescription_notice").css('color','#ff0000');
return false;
}
}
//验证开发人员
function regexDevelopers()
{
var workDescription = $("#softapplication_application_developers").val();
if(workDescription.length ==0)
{
$("#span_softapplication_application_developers").text("开发人员不能为空");
$("#span_softapplication_application_developers").css('color','#ff0000');
return false;
}
if(workDescription.length < 125)
{
$("#span_softapplication_application_developers").text("填写正确");
$("#span_softapplication_application_developers").css('color','#008000');
return true;
}
else
{
$("#span_softapplication_application_developers").text("开发人员超过125个汉字");
$("#span_softapplication_application_developers").css('color','#ff0000');
return false;
}
}
//提交验证
function submit_new_softapplication()
{
if(regexName() && regexWorkdescription() && regexDevelopers())
{
alert("123123123123");
$("#new_softapplication").submit();
}
}
</script>
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
<fieldset class="contes-new-box" style="padding-left: 36px; line-height: 8px; margin-left: 1px" >
<%= hidden_field_tag 'contest_id', @contest.id %>
<tr style="width:700px; margin-left: -10px;">
<span><%= l(:label_work_name) %></span>
<span class="contest-star"> * </span>:
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:320px;", :onblur => "regexName();" %></td>
<span style="font-size: 10px;" id="spane_name_notice">(<%= l(:label_workname_lengthlimit) %>)</span>
</tr>
<br/>
<br/>
@ -16,9 +102,9 @@
<span><%= l(:label_running_platform) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px">
<%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %>
<%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:320px;", :onblur=>"regexWorkdescription();"%>
</td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
<span style="font-size: 10px" id="spane_workdescription_notice">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br/>
@ -31,12 +117,12 @@
<span>
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
</span>
<%= f.select :app_type_name,work_type_opttion, {},{:style => "width:358px;",:onchange => "selectChange(this)"} %>
<%= f.select :app_type_name,work_type_opttion, {},{:style => "width:328px;",:onchange => "selectChange(this)"} %>
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
</td>
<span style="font-size: 10px;display: none" id="other_span">
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
<input type="text" style="width: 100px;" id="other_input" name = "other_input"/>
<input type="text" style="width: 120px;" id="other_input" name = "other_input"/>
</span>
</tr>
<br/>
@ -46,7 +132,7 @@
<tr style="width:800px;">
<span><%= l(:label_work_description) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %></td>
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:320px;" %></td>
<!--span style="font-size: 10px">(<%#= l(:label_workdescription_lengthlimit) %>)</span-->
</tr>
<br/>
@ -56,8 +142,8 @@
<tr style="width:800px;">
<span><%= l(:label_softapplication_developers) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:320px;", :onblur => 'regexDevelopers();' %></td>
<span style="font-size: 10px" id="span_softapplication_application_developers">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br/>
@ -65,7 +151,7 @@
<tr style="width:800px;">
<span><%= l(:label_work_deposit_project) %></span>
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %></span>
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:328px;" %></span>
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %></span><!-- new_project_path(course: 0, project_type: 0) -->
</tr>
<br/>
@ -90,7 +176,8 @@
</fieldset>
</fieldset></br>
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
<%= submit_tag l(:button_create) %>
<input type="button" class="enterprise" value="<%=l(:button_create) %>" onclick="submit_new_softapplication();" >
<%#= submit_tag l(:button_create) %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>

View File

@ -6,7 +6,7 @@
<p>
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= @contest.budget%></span></strong>
</p>
<div class="bid_description">
<div class="bid_description" style="width: 100%;word-break:break-all;">
<%= @contest.description %>
<!-- <%# if @contest.attachments.any?%>
<%# options = {:author => true} %>

View File

@ -14,6 +14,16 @@
}
</script>
<script type="text/javascript">
function check(){
var regex=/^\d*$/;
if (!regex.test($("#class_period").val())){
alert("学时只能为整数");
}
}
}
</script>
<% object = [] %>
@ -67,11 +77,11 @@
-->
<% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时",:maxlength=>5 %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
</td></tr></table></p>
<% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong>
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时",:maxlength=>5 %></span><strong><%= l(:label_class_hour)%></strong>
</td></tr></table></p>
<% end %>

View File

@ -1,3 +1,11 @@
<script type="text/javascript">
window.onready = function()
{
$("#issue_project_id").css("width","100%");
$("#issue_project_id").css("overflow ","hidden");
//issue_project_id
}
</script>
<%= labelled_fields_for :issue, @issue do |f| %>
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>

View File

@ -38,7 +38,7 @@
<% end -%>
<ul class="list-group-item-meta">
<div class="issue-list-description">
<div class="wiki">
<div class="wiki" style="width: 100%;word-break: break-all;">
<%= textilizable issue, :description %>
</div>
<!-- <#%= l(:field_description)%>:&nbsp;<#%= issue.short_description %> -->

View File

@ -37,21 +37,21 @@
<!--
<fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);">
<%= l(:label_options) %>
<%#= l(:label_options) %>
</legend>
<div style="display: none;">
<table>
<tr>
<td><%= l(:field_column_names) %></td>
<td><%= render_query_columns_selection(@query) %></td>
<td><%#= l(:field_column_names) %></td>
<td><%#= render_query_columns_selection(@query) %></td>
</tr>
<tr>
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
<td><label for='group_by'><%#= l(:field_group_by) %></label></td>
<td><%#= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
</tr>
<tr>
<td><%= l(:button_show) %></td>
<td><%= available_block_columns_tags(@query) %></td>
<td><%#= l(:button_show) %></td>
<td><%#= available_block_columns_tags(@query) %></td>
</tr>
</table>
</div>

View File

@ -44,11 +44,11 @@
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
<% hasCourse=true%>
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %>
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
<ul class="course_sub_menu">
<% User.current.courses.each do |course| %>
<% if !course_endTime_timeout?(course) %>
<li><%= link_to course.name.truncate(10, omission: '...'), {:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %></li>
<li><%= link_to course.name.truncate(10, omission: '...'), {:controller => 'courses',:action => 'show',id:course.id} %></li>
<% end %>
<% end %>
</ul>

View File

@ -54,7 +54,7 @@
<div id="sidebar">
<div class="spaceleft">
<div class="inf_user_image">
<% @project = Project.find_by_id(@project.id)%>
<% #@project = Project.find_by_id(@project.id)%>
<table>
<tr>
<td><%= image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
@ -66,7 +66,7 @@
<% if @project.project_type == 0 %>
<%= l(:label_project_grade)%> :
<%= link_to(format("%.2f" , project_scores(@project) ).to_i, {:controller => 'projects',
<%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects',
:action => 'show_projects_score',
:remote => true,
:id => @project.id

View File

@ -3,3 +3,14 @@ $('#principals_for_new_member').html('<%= escape_javascript(render_principals_fo
<% elsif @course%>
$('#principals_for_new_member').html('<%= escape_javascript(render_principals_for_new_course_members(@course)) %>');
<%end%>
var collection=$("#principals_for_new_member").children("#principals").children("label");
collection.css("text-overflow","ellipsis");
collection.css("white-space","nowrap");
collection.css("width","200px");
collection.css("overflow","hidden");
for(i=0;i<collection.length;i++){ //增加悬浮显示
var label=collection[i];
var text=$(label).text();
$(label).attr("title",text);
}

View File

@ -93,7 +93,7 @@
<%= link_to @topic.author, user_path(@topic.author) %>
</p>
</div>
<div class="memo-section">
<div class="memo-section" style="width: 100%;word-break: break-all;">
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
<% if @project %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
@ -160,7 +160,7 @@
<tr>
<td class="comments">
<div class="wiki">
<div class="wiki" style="width: 100%;word-break: break-all;">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<%#= message.content.html_safe %>
</div>

View File

@ -4,22 +4,22 @@
<div class="tools ">
<ul><h3>项目交流</h3>
<li><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project) %></li>
<li><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
<% if @project.enabled_modules.where("name = 'wiki'").count > 0 %>
<li><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
<% end %>
</ul>
<ul><h3>进度跟踪</h3>
<li><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
<li><%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %></li>
<li><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
</ul>
<ul><h3>其他工具</h3>
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
<% end %>
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<li></li>
</ul>

View File

@ -130,3 +130,17 @@
<% end %>
<% end %>
</div>
<script type="text/javascript">
$(document).ready(function () {
var collection=$("#principals_for_new_member").children("#principals").children("label");
collection.css("text-overflow","ellipsis");
collection.css("white-space","nowrap");
collection.css("width","200px");
collection.css("overflow","hidden");
for(i=0;i<collection.length;i++){ //增加悬浮显示
var label=collection[i];
var text=$(label).text();
$(label).attr("title",text);
}
});
</script>

View File

@ -25,13 +25,9 @@
</span>
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
<div class="activity_description info-break" style="font-size: 13px;">
<div class="issue-list-description">
<div class="wiki">
<%#= textilizable e.event_url,:description %>
</div>
</div>
<%= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/, ' '), length: 30, omission: '...')) %>
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;">
<%= textAreailizable e,:event_description %>
<%#= h(truncate(strip_tags(e.event_description).gsub(/&nbsp;/, ' '), length: 30, omission: '...')) %>
</div>
<div class="activity_status" style="position:relative; padding-top: 3px;">
<span class="font_lighter"> <%= l :label_activity_time %>

View File

@ -70,13 +70,21 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '5' %>
<% if Forum.find(params[:id]) %>
<% if Forum.find(params[:id]).creator_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>
<% end %>
<% end %>
<% when '6' %>
<% if (User.current.logged? &&
<%# if (User.current.logged? &&
User.current.admin?
# && (@project && User.current.member_of?(@project))
)
%>
<% if obj.author_id == User.current.id || User.current.admin?%>
<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 %>
@ -94,14 +102,8 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% end %>
<!--添加的删除标签0814添加 -->
<!--<%# 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>
<%# end %>
-->
</span>
</div>

View File

@ -153,7 +153,7 @@
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" >
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_hot_contest)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'contests', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'contests', :action => 'index'}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">
<div class="d-p-projectlist">
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
@ -294,7 +294,7 @@
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: left;">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'softapplications', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'softapplications', :action => 'index'}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">
<% if Softapplication.count > 0%>
<div class="d-p-projectlist">

View File

@ -42,7 +42,7 @@
</div>
<div class="course welcome_left" id="welcome_left">
<span class="font_welcome_school"> <% if @school_id.nil? and User.current.user_extensions.school.nil? %>
<span class="font_welcome_school"> <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
<% else %>
<% if @school_id == "0" %>
<% else %>
@ -58,7 +58,7 @@
<% unless @course_page.nil? %>
<span class="font_welcome_trustie"><%= @course_page.title %> </span>
<% if @school_id.nil? and User.current.user_extensions.school.nil? %>
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
<span class="font_welcome_tdescription">, <%= @course_page.description %></span>
<% else %>
<% if @school_id == "0" %>

View File

@ -79,7 +79,7 @@
<span class='font_lighter' title ='<%=project.short_description%>'><%=project.description.truncate(100, omission: '...')%></span>
</div>
<div >
<%= content_tag "span", l(:label_project_score)+ ":" + project_scores(project).to_s,
<%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s,
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300;",
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
:class => "tooltip",

View File

@ -177,58 +177,6 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
create_table "code_review_assignments", :force => true do |t|
t.integer "issue_id"
t.integer "change_id"
t.integer "attachment_id"
t.string "file_path"
t.string "rev"
t.string "rev_to"
t.string "action_type"
t.integer "changeset_id"
end
create_table "code_review_project_settings", :force => true do |t|
t.integer "project_id"
t.integer "tracker_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "updated_by"
t.boolean "hide_code_review_tab", :default => false
t.integer "auto_relation", :default => 1
t.integer "assignment_tracker_id"
t.text "auto_assign"
t.integer "lock_version", :default => 0, :null => false
t.boolean "tracker_in_review_dialog", :default => false
end
create_table "code_review_user_settings", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.integer "mail_notification", :default => 0, :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "code_reviews", :force => true do |t|
t.integer "project_id"
t.integer "change_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "line"
t.integer "updated_by_id"
t.integer "lock_version", :default => 0, :null => false
t.integer "status_changed_from"
t.integer "status_changed_to"
t.integer "issue_id"
t.string "action_type"
t.string "file_path"
t.string "rev"
t.string "rev_to"
t.integer "attachment_id"
t.integer "file_count", :default => 0, :null => false
t.boolean "diff_all"
end
create_table "comments", :force => true do |t|
t.string "commented_type", :limit => 30, :default => "", :null => false
t.integer "commented_id", :default => 0, :null => false
@ -441,10 +389,10 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sort_type"
t.integer "show_course", :default => 1
t.integer "show_contest", :default => 1
t.integer "image_width", :default => 107
t.integer "image_height", :default => 63
t.integer "show_course", :default => 1
t.integer "show_contest", :default => 1
end
create_table "forums", :force => true do |t|
@ -873,7 +821,7 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
t.integer "osp_id"
t.integer "parent_id"
t.string "subject", :null => false
t.text "content", :limit => 16777215, :null => false
t.text "content", :null => false
t.integer "author_id"
t.integer "replies_count", :default => 0
t.integer "last_reply_id"
@ -907,19 +855,6 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
create_table "rich_rich_files", :force => true do |t|
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "rich_file_file_name"
t.string "rich_file_content_type"
t.integer "rich_file_file_size"
t.datetime "rich_file_updated_at"
t.string "owner_type"
t.integer "owner_id"
t.text "uri_cache"
t.string "simplified_type", :default => "file"
end
create_table "roles", :force => true do |t|
t.string "name", :limit => 30, :default => "", :null => false
t.integer "position", :default => 1
@ -974,7 +909,6 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
t.datetime "updated_at", :null => false
t.integer "project_id"
t.integer "user_id"
t.string "description"
end
create_table "softapplications", :force => true do |t|
@ -1080,8 +1014,8 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "technical_title"
t.integer "identity"
t.string "technical_title"
t.string "student_id"
t.string "teacher_realname"
t.string "student_realname"
@ -1139,6 +1073,9 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
t.integer "active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "level"
t.integer "file"
t.integer "issue"
end
create_table "user_statuses", :force => true do |t|

View File

@ -408,7 +408,7 @@ Redmine::MenuManager.map :course_menu do |menu|
end
Redmine::MenuManager.map :user_menu do |menu|
menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain }
menu.push :user_course, {:controller => 'users', :action => 'user_courses', :host => Setting.course_domain}
menu.push :user_course, {:controller => 'users', :action => 'user_courses'}
#menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang
menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain}
# menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang

View File

@ -656,7 +656,7 @@ input[class='nyan-clean-gray']:active, .nyan-clean-gray:active {
}
.tools li {
background: url("/images/sidebar/tool_tag_alpha.png") 10px 30% no-repeat transparent;
/*background: url("/images/sidebar/tool_tag_alpha.png") 10px 30% no-repeat transparent;*/
color: #3e3e3e;
font-weight: 400;
line-height: 1.5em;