Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2016-12-13 11:07:26 +08:00
commit 203d98133a
10 changed files with 75 additions and 29 deletions

View File

@ -138,11 +138,23 @@
<% if @project.gpid %>
<%#= hidden_field_tag @issue_commit_ids %>
<input value="" name="commit_ids" id="commit_ids" type="hidden">
<li class="clear"><span>关联Commit</span>
<a href="javascript:void(0)" onclick="get_issue_commit_ids('issue_commit_ids','<%= @project.id %>');">
<span class='btn-commit btn-blue mt-2 fr'>+</span>
</a>
</li>
<% if @issue %>
<% if is_project_manager?(User.current.id, @project.id)|| User.current.id == @issue.author_id || User.current.admin? %>
<li class="clear"><span>关联Commit</span>
<a href="javascript:void(0)" onclick="get_issue_commit_ids('issue_commit_ids','<%= @project.id %>');">
<span class='btn-commit btn-blue mt-2 fr'>+</span>
</a>
</li>
<% end %>
<% else %>
<% if User.current.member_of?(@project) %>
<li class="clear"><span>关联Commit</span>
<a href="javascript:void(0)" onclick="get_issue_commit_ids('issue_commit_ids','<%= @project.id %>');">
<span class='btn-commit btn-blue mt-2 fr'>+</span>
</a>
</li>
<% end %>
<% end %>
<div id="issue_commit_ids">
<%= render :partial => "issues/issue_commit_ids", :locals => {:f => f} %>
</div>

View File

@ -2,7 +2,15 @@
<% @issue_commit_ids.each do |commit_id| %>
<div class="btn btn-blue mb5">
<%= link_to commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %>
<%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %>
<% if @issue %>
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || User.current.id == @issue.author_id %>
<%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %>
<% end %>
<% else %>
<% if User.current.member_of?(@project) %>
<%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %>
<% end %>
<% end %>
</div>
<% end %>
<% else %>

View File

@ -22,7 +22,7 @@
</li>
</ul>
<div class="hw_search_box fr mb10" >
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="hw_search-input" style="width:300px;">
<input type="text" name="search" placeholder="输入描述内容进行搜索" class="hw_search-input" style="width:300px;">
<%= submit_tag '', :class => 'hw_btn_search', :onfocus => 'this.blur();', :style => 'border-style:none' %>
</div>
<% end %>

View File

@ -51,7 +51,6 @@
str += ",";
}
}
alert(str);
$('#issue_for_commit_ids').val(str);
$('#commit_for_issue').submit();
hideModal();

View File

@ -1,3 +1,9 @@
var checked = $("input[name='checkbox1[]']:checked").size();
if(checked > 0)
{
alert('翻页或搜索后将丢失当前选择的提交记录!');
}
<% if @type %>
$("#issue_commit_list").html('<%= escape_javascript(render :partial => 'issues/issue_commits_list') %>');
<% else %>

View File

@ -143,7 +143,7 @@
<div class="cl"></div>
</div>
<div class="undis ml15 mr15" id="orgContent_3">
<!--新增二级栏目-->
<!--新增二级栏目-->
<div>
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id => 'add_subfield_form',:remote => true do %>
<span class="fontGrey3 fb mb5 mr10" >新增一级栏目</span>
@ -155,6 +155,7 @@
<% else %>
<span class="fontGrey2">(用户自定义url可选) 您还没有子域名,请先在左侧信息栏申请子域名</span>
<% end %>
<div id="sub_dir_tip" class="mt10 c_red" style="display: none;">您输入的域名目录是关键字,不能使用</div>
<div class="cl"></div>
</div>
<ul class="orgAddRole mb10">
@ -183,8 +184,24 @@
</div>
<script>
function regex_domain_name()
{
var name = $.trim($("#sub_dir").val());
var domain = ["members","more_org_submains","more_org_projects","more_org_courses","search_courses","teachers","students","projects","courses","acts","search_projects"]
if(domain.indexOf(name) > 0)
{
$("#sub_dir_tip").show();
return false;
}
else
{
$("#sub_dir_tip").hide();
return true;
}
}
function add_org_subfield(){
if ($("#subfield_name").val().trim() != "")
if ($("#subfield_name").val().trim() != "" && regex_domain_name())
$("#add_subfield_form").submit();
}
function add_org_subfield_subdomain(){

View File

@ -9,10 +9,10 @@
<div class="homepagePostTo break_word">
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
TO
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.course), :class => "newsBlue ml15" %>
<%= link_to activity.project.name.to_s+" | 项目资源", project_files_path(activity.project), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word" >
<%= link_to activity.filename, project_files_path(activity.course), :class => "postGrey" %>
<%= link_to activity.filename, project_files_path(activity.project), :class => "postGrey" %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline mr15">

View File

@ -1,7 +1,7 @@
<!--新版项目头部结束-->
<div class="ke-block pro_new_info mb10 " style="padding-bottom: 5px;word-break: normal;word-wrap: break-word" >
<div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div>
<div id="project_description_code" style="padding: 0 15px 10px 15px;">
<div id="project_description_code" style="padding: 0 15px 10px 15px;font-size: 14px;">
<% if @project.description.blank? %>
<p style="padding-top:5px"><%= @project.name %></p>
<% else %>

View File

@ -17,14 +17,16 @@
<%= link_to_user_mail(commit.author_email, "pullreques_pull_name fl ml10") %>
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
<% get_commit_issues(commit.short_id, @project.id, 0).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5 fr">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% unless get_commit_issues(commit.short_id, @project.id, 0).nil? %>
<% get_commit_issues(commit.short_id, @project.id, 0).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5 fr">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% end %>
<% end %>
<div class="cl"></div>
</li>

View File

@ -10,14 +10,16 @@
</div>
<div class=" clear mb10">
<p class="fb c_grey">关联Issue:</p>
<% get_commit_issues(@commit_details.short_id, @project.id, 1).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => @commit_details.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% unless get_commit_issues(@commit_details.short_id, @project.id, 1).nil? %>
<% get_commit_issues(@commit_details.short_id, @project.id, 1).each do |issue_id| %>
<div class="btn-commit-issue btn-blue mb5 mr5">
<% if issue_id == "more" %>
<%= link_to "更多", {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => @commit_details.id}, :target => "_blank", :class => "commit_id_value mr5" %>
<% else %>
<%= link_to "##{issue_id}", issue_path(issue_id), :target => "_blank", :class => "commit_id_value mr5" %>
<% end %>
</div>
<% end %>
<% end %>
</div>
<li class="commit js-toggle-container">