Merge branch 'szzh' into gitlab_guange

This commit is contained in:
huang 2015-11-03 17:20:56 +08:00
commit fa3ff4d067
31 changed files with 326 additions and 146 deletions

View File

@ -1,3 +1,4 @@
#encoding: utf-8
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
#
@ -378,6 +379,8 @@ class FilesController < ApplicationController
tag_name = l(:label_media)
when "4"
tag_name = l(:label_code)
when "6"
tag_name = "论文"
else
tag_name = ""
end

View File

@ -224,10 +224,6 @@ update
#if( !User.current.member_of?(@project) || @project.hidden_repo)
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
# g = Gitlab.client
# project = g.project(20)
# rr = g.trees(project.id, @path)
# r = g.get ("/projects/#{@project}/repository/tree")
# :name, :path, :kind, :size, :lastrev, :changeset
@entries = @repository.entries(@path, @rev)
# @trees = g.trees(project, @path)
@ -241,10 +237,18 @@ update
#Modified by young
# (show_error_not_found; return) unless @entries
g = Gitlab.client
@changesets = g.get ("/projects/#{@project.gpid}/repository/commits")
count = 0
(0..100).each do |page|
if g.commits(@project.gpid,:page => page).count == 0
break
else
count = count + g.commits(@project.gpid,:page => page).count
end
end
@changesets = g.commits(@project.gpid)
# @changesets = @repository.latest_changesets(@path, @rev)
# @changesets_count = @repository.latest_changesets(@path, @rev).count
@changesets_count = @changesets.count
@changesets_all_count = count
@changesets_latest_coimmit = @changesets[0]
@properties = @repository.properties(@path, @rev)
@repositories = @project.repositories
@ -271,7 +275,9 @@ update
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
g = Gitlab.client
@changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}")
@commits = g.commits(@project.gpid, page:params[:pamge])
@commit = g.commit(@project.gpid,@rev)
# @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}")
#@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i)
@properties = @repository.properties(@path, @rev)
@changeset = @repository.find_changeset_by_name(@rev)

View File

@ -303,6 +303,7 @@ class CoursesService
#@state == 7 您已经发送过申请了,请耐心等待
#@state == 8 您已经是该课程的教师了
#@state == 9 您已经是该课程的教辅了
#@state == 10 您已经是该课程的管理员了
#@state 其他 未知错误,请稍后再试
def join_course params,current_user
course = Course.find_by_id params[:object_id]
@ -325,6 +326,8 @@ class CoursesService
#如果加入的角色教辅并且当前为教辅
elsif params[:role] == "7" && roleName == "TeachingAsistant"
@state = 9
elsif roleName == "Manager"
@state = 10
#如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求
elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" )
#如果已经发送过消息了,那么就要给个提示

View File

@ -86,6 +86,9 @@
}
function register(){
if($("#loginUpButton").hasClass('loginUpDisableButton')){
return;
}
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit();
}else{
@ -182,6 +185,16 @@
$('#main_login_form').submit();
}
}
function changeRegisterBtn(checkbox){
if(checkbox.checked == true){
$("#loginUpButton").removeClass('loginUpDisableButton');
$("#loginUpButton").addClass('loginUpButton');
}else{
$("#loginUpButton").removeClass('loginUpButton')
$("#loginUpButton").addClass('loginUpDisableButton');
}
}
</script>
<div class="loginContentContainer">
<div class="loginContent">
@ -270,11 +283,11 @@
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/>
<input type="checkbox" id="read_and_confirm" onchange="changeRegisterBtn(this);"/>
</div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();">注册</a>
<div class="loginUpDisableButton" id="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();" >注册</a>
</div>
<% end %>

View File

@ -32,6 +32,10 @@ window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @co
alert("您已经是该课程的教辅了");
hidden_join_course_form();
window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% elsif @state == 10%>
alert("您已经是该课程的管理员了");
hidden_join_course_form();
window.location.href= "http://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% else %>
alert("未知错误,请稍后再试");
<% end %>

View File

@ -1,26 +1,4 @@
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
</div>
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
<button name="button" class="sub_btn" onclick="_file.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
<% if @course %>
@ -68,3 +46,29 @@
</span>
(<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
<div class="cl">
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
</div>
</div>

View File

@ -26,6 +26,9 @@
case 4:
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 4}) %>');
break;
case 6:
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 6}) %>');
break;
default:
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 5}) %>');
}
@ -77,6 +80,7 @@
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(2);">软件</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(3);">媒体</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(4);">代码</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(6);">论文</a>&nbsp;|&nbsp;
<a href="javascript:void(0);" class=" c_dblue font_bold" onclick="show_upload(5);">其他</a>
</p>
<% end %>

View File

@ -0,0 +1,71 @@
<% checkBox = (@course.present? && @course.is_public?) ? 'public' : 'private'%>
<button name="button" class="sub_btn" onclick="_file.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse) %></button>
<% if @course %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '':'file_selector',
:multiple => true,
:onchange => 'addInputFilesCourseSource(this,"'+ checkBox.to_s+'");',
:style => ie8? ? '': 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<% else %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '':'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:style => ie8? ? '': 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js'),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<% end %>
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
<span id="upload_file_count">
<%= l(:label_no_file_uploaded)%>
</span>
(<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
<div class="cl"></div>
<div>
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
</div>

View File

@ -0,0 +1,42 @@
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
<div class="upload_con">
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
<div class="upload_box">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
<%= form_tag(course_files_path(course), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<input type="hidden" name="course_attachment_type" value="<%= course_attachment_type%>">
<!--<p class="c_grey fr mt10 mr5">-->
<div class="c_dark">
<input name="course_attachment_type" type="radio" value="1" checked class="c_dark" >课件</input>&nbsp;<span class="c_grey">|</span>&nbsp;
<input name="course_attachment_type" type="radio" value="2" class="c_dblue">软件</input>&nbsp;<span class="c_grey">|</span>&nbsp;
<input name="course_attachment_type" type="radio" value="3" class="c_dblue">媒体</input>&nbsp;<span class="c_grey">|</span>&nbsp;
<input name="course_attachment_type" type="radio" value="4" class="c_dblue">代码</input>&nbsp;<span class="c_grey">|</span>&nbsp;
<input name="course_attachment_type" type="radio" value="6" class="c_dblue">论文</input>&nbsp;<span class="c_grey">|</span>&nbsp;
<input name="course_attachment_type" type="radio" value="5" class="c_dblue">其他</input></a>
</div>
<div class="cl"></div>
<div>
<%= render :partial => 'files/new_style_attachment_list',:locals => {:course => course} %>
</div>
<div class="cl"></div>
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
<% end %>
</div>
</div>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>
<% end %>
</div>
<script>
function submit_resource()
{
$('#submit_resource').parent().submit();
}
</script>

View File

@ -1,7 +1,7 @@
<div id="popbox_upload" class="box_h3 mb10" style="margin-top: -30px">
<div id="popbox_upload" class=" mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
<div class="upload_con">
<h2><%= l(:label_upload_files)%></h2>
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
<div class="upload_box">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>

View File

@ -1,16 +1,16 @@
<div id="popbox_upload" class="box_h3 mb10" style="margin-top: -30px">
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
<div class="upload_con">
<h2><%= l(:label_upload_files)%></h2>
<h2 style="text-align: center"><%= l(:label_upload_files)%></h2>
<div class="upload_box">
<%= error_messages_for 'attachment' %>
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
<%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<!-- <label style="margin-top:3px;"><#%= l(:label_file_upload)%></label> -->
<%= render :partial => 'attachement_list',:locals => {:project => project} %>
<%= render :partial => 'files/attachement_list',:locals => {:project => project} %>
<div class="cl"></div>
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%= l(:button_cancel)%></a>
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
<% end %>
</div>

View File

@ -22,7 +22,7 @@ $("#attachments_fields").children().remove();
$("#upload_file_count").text("未上传文件");
$('#upload_file_div').slideToggle('slow');
<% if @project %>
closeModal();
hideModal();
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
$("#project_files_count_info").html("<%= @all_attachments.count%>");
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")

View File

@ -247,7 +247,7 @@
tagId = id;
taggableType = type;
width = parseInt(domEle.css('width').replace('px', '')) >= 100 ? parseInt(domEle.css('width').replace('px', '')) : 100
domEle.html('<input name="" id="renameTagName" maxlength="<%=Setting.tags_max_length%>" minlength="<%= Setting.tags_min_length%>" style="width:' + width + 'px;" value="' + name + '"/>');
domEle.html('<input name="" id="renameTagName" maxlength="120" minlength="1" style="width:' + width + 'px;" value="' + name + '"/>');
domEle.parent().css("border", "1px solid #ffffff");
$("#renameTagName").focus();
}
@ -295,8 +295,8 @@
// }else{ //否则就要更新tag名称了
//// if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ 去掉询问
// $.post(
// '<%= update_tag_name_path %>',
// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%= @course.id%>}
// '<%#= update_tag_name_path %>',
// {"taggableId": tagId, "taggableType": taggableType, "tagName": tagName, "renameName": $("#renameTagName").val().trim(),"courseId":<%#= @course.id%>}
// )
//// }else{
//// ele.parent().css("border","");

View File

@ -21,12 +21,11 @@
</a>
<% end %>
</div>
<div class="mt5">
<div class="mt5" style="color: #269ac9;cursor: default">
<!--<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #269ac9;">-->
<%#= l(:label_technical_support) %>
<!--白&nbsp;&nbsp;&nbsp;羽</a> http://shang.qq.com/wpa/qunwpa?idkey=4fe2d63a4527cddce038f04f0b1d728a62082074fb4a74870a5444ee1a6910ad-->
<a href="javascript:void(0);" style="color: #269ac9;">
<p style="text-align: center"> 请加入师姐答疑群</p> <p style="text-align: center">173184401</p> </a>
<p style="text-align: center"> 请加入师姐师兄答疑群</p> <p style="text-align: center">QQ群号173184401</p>
</div>
</div>
<div class="side_bottom"></div>

View File

@ -138,7 +138,10 @@
<div class="subNav">
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %>
<%= link_to "(#{course_file_num})", course_files_path(@course), :class => "subnav_num c_orange",:id=>'courses_files_count_nav' %>
<%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
<% if is_teacher %>
<!--link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white')-->
<a class="subnav_green ml95 c_white" href="javascript:void(0);" onclick="course_files_upload();">+上传资源 </a>
<% end %>
</div>
<div class="subNav">
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
@ -246,6 +249,15 @@
})
function course_files_upload(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
}
</script>
</html>

View File

@ -61,14 +61,14 @@
function addTag(){
if(<%=@forum.creator.id == User.current.id%>) {
if ($("input[name='addTag']").val().trim() != "" ) {
if($("input[name='addTag']").val().trim().length <= 14) {
if($("input[name='addTag']").val().trim().length <= 120) {
$.get(
'<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(),
{}
);
$("input[name='addTag']").val('');
}else{
alert("标签名字长度不能超过14个字符");
alert("标签名字长度不能超过120个字符");
}
}
}

View File

@ -13,7 +13,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'public', 'pleft', 'project','prettify','jquery/jquery-ui-1.9.2','header','repository' %>
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move' %>
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
@ -223,6 +223,16 @@
}
);
}
function project_files_upload()
{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_show_project',:locals => {:project => @project}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%");
$('#ajax-modal').parent().addClass("popbox_polls");
}
</script>
</div>
<div id="fade" class="black_overlay">123</div>

View File

@ -34,7 +34,8 @@
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %>
<% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
<%#= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
<a class="subnav_green m195" href="javascript:void(0);" onclick="project_files_upload();">+上传资源</a>
<% end %>
</div>
<% end %>

View File

@ -14,7 +14,7 @@
<%= render_properties(@properties) %>
<div class="mt10">
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @commits, :entry => @entry }) unless @commits.empty? %>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>

View File

@ -40,7 +40,7 @@
</span>
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
<%=link_to @changesets_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %></font> 提交
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev} %></font> 提交
</span>
</div>
<% end %>

View File

@ -259,7 +259,7 @@ tags_min_length:
default: 1
tags_max_length:
format: int
default: 14
default: 120
tags_show_search_results:
format: int
default: 5

View File

@ -1,23 +1,11 @@
#coding=utf-8
namespace :rep_fault do
desc "update fault rep"
desc "set ossean's type value"
task :rep_update => :environment do
Project.all.each do |project|
if project.repositories.count > 0
unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank?
project.repositories.each do |repository|
repository.is_default =1
repository.save
end
end
end
end
rep = Repository.find(400)
rep.type = "Repository::Gitlab"
rep.save
end
# desc "update ossean's data"
# task :update_type => :environment do
# repository = Repository.find(400)
# repository.update_attributes(:type => "Repository::Git")
# end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -37,27 +37,27 @@ function addFile_board(inputEl, file, eagerUpload, id) {
fileSpan.append(
$('<input>', {
'type': 'text',
'class': 'filename readonly',
'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly'
}).val(file.name),
$('<input>', {
'type': 'text',
'class': 'description',
'name': 'attachments[' + attachmentId + '][description]',
'maxlength': 254,
'placeholder': $(inputEl).data('descriptionPlaceholder')
}).toggle(!eagerUpload),
$('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
'class': 'ispublic-label'
}),
$('<input>', {
'type': 'checkbox',
'class': 'is_public_checkbox',
'value': 1,
'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
checked: 'checked'
}).toggle(!eagerUpload),
// $('<input>', {
// 'type': 'text',
// 'class': 'description',
// 'name': 'attachments[' + attachmentId + '][description]',
// 'maxlength': 254,
// 'placeholder': $(inputEl).data('descriptionPlaceholder')
// }).toggle(!eagerUpload),
// $('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
// 'class': 'ispublic-label'
// }),
// $('<input>', {
// 'type': 'checkbox',
// 'class': 'is_public_checkbox',
// 'value': 1,
// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
// checked: 'checked'
// }).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({
'href': "#",
'class': 'remove-upload',
@ -103,27 +103,27 @@ function addFile(inputEl, file, eagerUpload) {
fileSpan.append(
$('<input>', {
'type': 'text',
'class': 'filename readonly',
'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly'
}).val(file.name),
$('<input>', {
'type': 'text',
'class': 'description',
'name': 'attachments[' + attachmentId + '][description]',
'maxlength': 254,
'placeholder': $(inputEl).data('descriptionPlaceholder')
}).toggle(!eagerUpload),
$('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
'class': 'ispublic-label'
}),
$('<input>', {
'type': 'checkbox',
'class': 'is_public_checkbox',
'value': 1,
'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
checked: 'checked'
}).toggle(!eagerUpload),
// $('<input>', {
// 'type': 'text',
// 'class': 'description',
// 'name': 'attachments[' + attachmentId + '][description]',
// 'maxlength': 254,
// 'placeholder': $(inputEl).data('descriptionPlaceholder')
// }).toggle(!eagerUpload),
// $('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
// 'class': 'ispublic-label'
// }),
// $('<input>', {
// 'type': 'checkbox',
// 'class': 'is_public_checkbox',
// 'value': 1,
// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
// checked: 'checked'
// }).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({
'href': "#",
'class': 'remove-upload'
@ -532,17 +532,17 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) {
fileSpan.append(
$('<input>', {
'type': 'text',
'class': 'filename readonly',
'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly'
}).val(file.name),
$('<input>', {
'type': 'text',
'class': 'description',
'name': 'attachments[' + attachmentId + '][description]',
'maxlength': 254,
'placeholder': $(inputEl).data('descriptionPlaceholder')
}).toggle(!eagerUpload),
// $('<input>', {
// 'type': 'text',
// 'class': 'description',
// 'name': 'attachments[' + attachmentId + '][description]',
// 'maxlength': 254,
// 'placeholder': $(inputEl).data('descriptionPlaceholder')
// }).toggle(!eagerUpload),
$('<div>', {
'class': 'div_attachments',
'name': 'div_' + 'attachments_' + attachmentId
@ -552,27 +552,27 @@ function addFileCourseSource(inputEl, file, eagerUpload,checkBox) {
fileSpan.append(
$('<input>', {
'type': 'text',
'class': 'filename readonly',
'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly'
}).val(file.name),
$('<input>', {
'type': 'text',
'class': 'description',
'name': 'attachments[' + attachmentId + '][description]',
'maxlength': 254,
'placeholder': $(inputEl).data('descriptionPlaceholder')
}).toggle(!eagerUpload),
$('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
'class': 'ispublic-label'
}),
$('<input>', {
'type': 'checkbox',
'class': 'is_public_checkbox',
'value': 1,
'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
checked: 'checked'
}).toggle(!eagerUpload),
// $('<input>', {
// 'type': 'text',
// 'class': 'description',
// 'name': 'attachments[' + attachmentId + '][description]',
// 'maxlength': 254,
// 'placeholder': $(inputEl).data('descriptionPlaceholder')
// }).toggle(!eagerUpload),
// $('<span >' + $(inputEl).data('fieldIsPublic') + ':</span>').attr({
// 'class': 'ispublic-label'
// }),
// $('<input>', {
// 'type': 'checkbox',
// 'class': 'is_public_checkbox',
// 'value': 1,
// 'name': 'attachments[' + attachmentId + '][is_public_checkbox]',
// checked: 'checked'
// }).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({
'href': "#",
'class': 'remove-upload'

View File

@ -2745,15 +2745,31 @@ h2 img { vertical-align:middle; }
/*added by william*/
#tag {
background: url(../images/issue_tag.png) no-repeat right -19px;
border-radius: 3px;
color: #3a587d !important;
padding: 1px 4px 2px 4px;
margin: 3px;
display: inline-block;
font-size: 13px; /*modified by linchun*/
text-decoration: none;
cursor: pointer;
/*background: url(../images/issue_tag.png) no-repeat right -19px;*/
/*border-radius: 3px;*/
/*color: #3a587d !important;*/
/*padding: 1px 4px 2px 4px;*/
/*margin: 3px;*/
/*display: inline-block;*/
/*font-size: 13px; *//*modified by linchun*/
/*text-decoration: none;*/
/*cursor: pointer;*/
border-radius: 3px;
color: #3a587d !important;
padding: 1px 4px 2px 4px;
margin: 3px;
display: inline-block;
font-size: 13px;
text-decoration: none;
cursor: pointer;
width: auto;
padding: 0 5px;
padding-top: 2px;
border: 1px solid #f8df8c;
background: #fffce6;
margin-right: 5px;
word-wrap: break-word;
word-break: break-all;
}
/*tanxianbo*/

View File

@ -552,7 +552,7 @@ blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: bre
#attachments_fields input.description {margin-left: 4px;width: 100px;}
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;}
#attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px; white-space: nowrap; }
span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields span {display: block;white-space: nowrap;}
.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);}
@ -570,7 +570,7 @@ a.remove-upload:hover {text-decoration:none !important;}
.attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
.attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
.attachments_fields input.filename {border: 0;height: 1.8em;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px ;padding-left: 18px;padding-top: 2px;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields span {display: block;white-space: nowrap;}
.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);}
@ -889,6 +889,7 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
.c_w{ color:#fff;}
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.evaluation{position: relative;}
.evaluation_submit{position: absolute;right: 0px;bottom: 0px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }

View File

@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;}
.tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;}

View File

@ -726,6 +726,8 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;}
.loginInButton:hover {background-color: #297fb8}
.loginUpButton:hover {background-color: #297fb8}
.loginUpDisableButton {width:315px; height:40px; background-color:#C1C1C1; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;}
.loginUpDisableButton:hover {background-color: #C1C1C1}
.loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;}
.loginSign {width:405px; background-color:#ffffff;}
.loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;}
@ -1144,6 +1146,7 @@ img.ui-datepicker-trigger {
text-overflow: ellipsis;
margin-bottom: 3px;
}
.upload_filename{ background: url(../images/pic_file.png) 0 -25px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
.message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}

View File

@ -59,7 +59,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;}
.tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;}

View File

@ -369,7 +369,7 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
.reply_btn:hover{ background:#999; color:#fff; }
.upload_filename{ background: url(../images/pic_file.png) 0 -22px no-repeat;color: #7f7f7f;width: 370px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
.attachments_fields input.description {margin-left:4px; width:100px; }
.attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}
.attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }

View File

@ -56,7 +56,7 @@ a:hover.subnav_green{ background:#14ad5a;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;}
.tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;}