Merge branch 'develop' into dai_ao
This commit is contained in:
commit
c1ee387a66
|
@ -39,3 +39,4 @@ public/javascripts/wechat/node_modules/
|
|||
.access_token
|
||||
tmux*.log
|
||||
config/wechat.yml
|
||||
config/oneapm.yml
|
||||
|
|
|
@ -26,7 +26,7 @@ class BlogsController < ApplicationController
|
|||
@type = 2
|
||||
|
||||
@topics.each do |topic|
|
||||
topic[:infocount] = get_praise_num(topic) + (topic.parent ? topic.parent.children.count : topic.children.count)
|
||||
topic[:infocount] = get_praise_num(topic) + BlogComment.where("root_id = #{topic.id}").count
|
||||
if topic[:infocount] < 0
|
||||
topic[:infocount] = 0
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
#
|
||||
|
@ -739,7 +740,7 @@ class ProjectsController < ApplicationController
|
|||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
# 删除Trustie班额本库记录
|
||||
# 删除Trustie版本库记录
|
||||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
@project.update_column(:gpid, nil)
|
||||
|
@ -799,6 +800,31 @@ class ProjectsController < ApplicationController
|
|||
@project = nil
|
||||
end
|
||||
|
||||
REP_TYPE = "Repository::Gitlab"
|
||||
# Delete @project's repository
|
||||
def destroy_repository
|
||||
if is_project_manager?(User.current.id, @project.id)
|
||||
@gitlab_repository = Repository.where(:project_id => @project, :type => REP_TYPE).first
|
||||
@is_true = params[:is_true]
|
||||
if @is_true
|
||||
begin
|
||||
g = Gitlab.client
|
||||
g.delete_project(@project.gpid)
|
||||
@gitlab_repository.destroy
|
||||
@gitlab_repository = nil
|
||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@project.update_attribute(:gpid, nil)
|
||||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
end
|
||||
else
|
||||
return render_403
|
||||
end
|
||||
end
|
||||
|
||||
def show_projects_score
|
||||
respond_to do |format|
|
||||
format.html { render :layout => "base_projects"}
|
||||
|
@ -946,6 +972,14 @@ class ProjectsController < ApplicationController
|
|||
else
|
||||
@users -= watched.watcher_users if @watched
|
||||
end
|
||||
@watchers = @project.watcher_users
|
||||
@limit = 20
|
||||
@is_remote = true
|
||||
@watchers_count = @watchers.count
|
||||
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
|
||||
@offset ||= @watcher_pages.offset
|
||||
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
||||
@watchers = paginateHelper @watchers,20
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -962,5 +996,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
return projects
|
||||
end
|
||||
|
||||
#gcmend
|
||||
end
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class PullRequestsController < ApplicationController
|
|||
if compare_pull_request(source_branch, target_project_id, target_branch)
|
||||
# 如果传送了目标项目ID即向fork源项目发送请求
|
||||
# if params[:forked_project_id] && params[:source_project] == "forked_project_name"
|
||||
if params[:target_project_id]
|
||||
if params[:target_project_id].to_i != @project.id
|
||||
target_project_id = params[:forked_project_id].to_i
|
||||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
|
||||
@fork_project_name = Project.find(params[:target_project_id]).try(:name)
|
||||
|
@ -109,7 +109,7 @@ class PullRequestsController < ApplicationController
|
|||
format.js{redirect_to new_project_pull_request_path(:show_tip => tip)}
|
||||
end
|
||||
end
|
||||
rescue Exception => e
|
||||
rescue Gitlab::Error::Conflict => e
|
||||
@message = e.message
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1369,9 +1369,10 @@ class UsersController < ApplicationController
|
|||
@jour = jours.limit(10).offset(@page * 10)
|
||||
@type = params[:type]
|
||||
if User.current == @user
|
||||
jours.update_all(:is_readed => true, :status => false)
|
||||
jours.each do |journal|
|
||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||
@jour.update_all(:is_readed => true, :status => false)
|
||||
@jour.each do |journal|
|
||||
# fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||
journal.delay.set_children_readed_delay
|
||||
end
|
||||
end
|
||||
@state = false
|
||||
|
|
|
@ -37,7 +37,9 @@ class WatchersController < ApplicationController
|
|||
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
||||
@action = 'fans'
|
||||
else
|
||||
|
||||
if params[:target_id]
|
||||
@user = User.find(params[:target_id])
|
||||
end
|
||||
end
|
||||
|
||||
if params[:object_type] == 'project'
|
||||
|
@ -78,6 +80,9 @@ class WatchersController < ApplicationController
|
|||
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
||||
@action = 'fans'
|
||||
else
|
||||
if params[:target_id]
|
||||
@user = User.find(params[:target_id])
|
||||
end
|
||||
end
|
||||
if params[:object_type] == 'project'
|
||||
@project = Project.find(params[:object_id])
|
||||
|
|
|
@ -137,7 +137,7 @@ class WechatsController < ActionController::Base
|
|||
on :fallback, respond: 'fallback message'
|
||||
|
||||
on :click, with: 'FEEDBACK' do |request, key|
|
||||
request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:373967360,直接互动。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321"
|
||||
request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:373967360,直接互动。\n3、登录网站:www.trustie.net,给我们留言。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321"
|
||||
end
|
||||
|
||||
on :click, with: 'MY_NEWS' do |request, key|
|
||||
|
|
|
@ -312,6 +312,16 @@ module ProjectsHelper
|
|||
type << option2
|
||||
end
|
||||
|
||||
# 判断用户是否为项目管理员
|
||||
def is_project_manager?(user_id, project_id)
|
||||
@result = false
|
||||
mem = Member.where("user_id = ? and project_id = ?",user_id, project_id)
|
||||
unless mem.blank?
|
||||
@result = mem.first.roles.to_s.include?("Manager") ? true : false
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
# 用来判断用户是否是项目的管理员
|
||||
# added by william
|
||||
def is_manager?(user_id,project_id)
|
||||
|
|
|
@ -333,6 +333,7 @@ module WatchersHelper
|
|||
return '' unless user && user.logged?
|
||||
objects = Array.wrap(objects)
|
||||
watched = objects.any? {|object| object.watched_by?(user)}
|
||||
watched = true if user.id == @project.user_id
|
||||
@watch_flag = objects.first.instance_of?(Project)
|
||||
id = watcher_css(objects)
|
||||
text = @watch_flag ?
|
||||
|
@ -340,8 +341,13 @@ module WatchersHelper
|
|||
url = watch_path(:object_type => objects.first.class.to_s.underscore,
|
||||
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort))
|
||||
method = watched ? 'delete' : 'post'
|
||||
if user.id != @project.user_id
|
||||
link_to text, url, :remote => true, :method => method,
|
||||
:class => "pro_new_topbtn_left fl" ,:id=>id
|
||||
:class => "pro_new_topbtn_left fl" ,:id => id
|
||||
else
|
||||
link_to "关注", "javascript:void(0)", :remote => true, :method => method,
|
||||
:class => "pro_new_grey_topbtn_left fl" , :id => id
|
||||
end
|
||||
end
|
||||
|
||||
def store_project_link project_id, user_id
|
||||
|
|
|
@ -344,4 +344,9 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
def content_detail
|
||||
self.notes
|
||||
end
|
||||
|
||||
def set_children_readed_delay
|
||||
# fetch_user_leaveWord_reply(self).update_all(:is_readed => true, :status => false)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
||||
</li>
|
||||
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
||||
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||
<%= link_to "关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
<li>
|
||||
<a href="<%=user_fanslist_user_path(@user) %>">
|
||||
<strong>粉丝</strong><br />
|
||||
<span class="sy_cgrey"><%= @user.watcher_users.count %></span>
|
||||
<span id="user_fans_number" class="sy_cgrey"><%= @user.watcher_users.count %></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -214,7 +214,8 @@
|
|||
<li>确认密码 : </li>
|
||||
</ul>
|
||||
<ul class="setting_right ">
|
||||
<li><input id="password" name="password" class="w210" type="password" required="true" nh_required="1"></li>
|
||||
<input style="display:none;">
|
||||
<li><input id="password" name="password" autocomplete="off" class="w210" type="password" required="true" nh_required="1"></li>
|
||||
<li><input id="new_password" name="new_password" class="w210" type="password" required="true" nh_required="1"><span class="c_red ml5">请输入8-12个字符</span></li>
|
||||
<li><input id="new_password_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
|
||||
<li class="ml2">
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<!--关注项目-->
|
||||
<li class="mr5 fl">
|
||||
<%= watcher_link_for_project(@project, User.current) %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id},:id=>"fans_num", :class => 'pro_new_topbtn fl' %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "watcherlist",
|
||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||
</li>
|
||||
<!--加入项目-->
|
||||
<li class="mr5 fl">
|
||||
|
@ -12,15 +13,21 @@
|
|||
<% else %>
|
||||
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
||||
<% end %>
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<!--项目创建者不能退出项目-->
|
||||
<% if User.current.id != @project.user_id %>
|
||||
<% if User.current.login? %>
|
||||
<li class="mr5 fl">
|
||||
<%= watcher_link_for_project(@project, User.current) %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "watcherlist",
|
||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||
</li>
|
||||
<li class="mr5 fl">
|
||||
<a class="pro_new_topbtn_left fl "> 已加入</a>
|
||||
<a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>
|
||||
<!-- <a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>-->
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||
</li>
|
||||
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||
<% end %>
|
||||
|
@ -35,8 +42,17 @@
|
|||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="pro_new_topbtn_left fl" target="_blank">Fork</a>-->
|
||||
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
||||
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl"><%= @project.forked_count.to_i %></a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
||||
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="mr5 fl">
|
||||
<%#= link_to "<span class='vl_fork '></span>".html_safe+"Fork","#",
|
||||
:class=>"pro_new_grey_topbtn_left fl"%>
|
||||
<a href="javascript:void(0)" class="pro_new_grey_topbtn_left fl" >
|
||||
<span class='vl_fork'>Fork</span>
|
||||
</a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
<div class="st_list2" style="width:970px;">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
<ul class="clear pro_new_users_box">
|
||||
<% members.each do |member| %>
|
||||
<div class="st_boxlist">
|
||||
<a href="javascript:" class="st_img">
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<span class="fr ml10 c_grey"><%= l(:label_user_for_project_grade) %>:<span class="c_orange"><%= format("%.2f" ,read_user_project_scores(member.user,@project)).to_i %></span></span>
|
||||
|
||||
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
|
||||
<%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %>(<%= rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ') %>)<br/>
|
||||
|
||||
|
||||
<span class="fr c_grey"><%= format_date(member.created_on)%></span>
|
||||
<li class="clear">
|
||||
<%= link_to image_tag(url_to_avatar(member.user), :width => "50", :height => "50"), user_path(member.user), :alt => "用户头像", :class => "pro_new_users fl mr5" %>
|
||||
<div class="fl mt5 clear">
|
||||
<%= link_to member.user.try(:show_name), user_path(member.user), :class => "pro_new_users mt5 fl" %>
|
||||
<!--<span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%#= link_to project.name, user_path(member.user), :class => "pro_new_users mt5 fl" %>-->
|
||||
<br/>
|
||||
<span class=" c_grey mt3 fl"><%= h time_tag(member.created_on) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<div style="width:460px;">
|
||||
<div class="sy_popup_top">
|
||||
<h3 class="fl">提示</h3>
|
||||
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="sy_popup_con" style="width:380px;">
|
||||
<ul class="sy_popup_add" >
|
||||
<li class="center mb5" style="line-height:20px">
|
||||
删除操作会彻底删除版本库及源码,一旦删除不能恢复</br>
|
||||
你确定删除吗?
|
||||
</li>
|
||||
<li class="mt10">
|
||||
<label class="mr27"> </label>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取 消</a>
|
||||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确 定</a>-->
|
||||
<%= link_to "确 定", destroy_repository_project_path(@project, :is_true => true), :remote => true, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
<% if @is_true %>
|
||||
$("#pro_st_tbc_06").html('<%= escape_javascript( render :partial => 'projects/settings/new_repositories') %>');
|
||||
<% else %>
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/reposistory_destory_pop') %>";
|
||||
pop_box_new(htmlvalue,460,316);
|
||||
<% end %>
|
|
@ -1,11 +1,12 @@
|
|||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title %></h2>
|
||||
<div class="pro_new_info mb10">
|
||||
<div class="project_r_h">
|
||||
<h2 class="clear"><%= @subPage_title %>
|
||||
<% if is_project_manager?(User.current, @project) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %>
|
||||
<%=link_to "成员管理", {:controller => 'projects', :action => 'settings'}, :id => @project.id, :tab => 'members', :class => "sy_cblue", :style => "font-weight: normal;" %>
|
||||
</span>
|
||||
<% end %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="member_content">
|
||||
<%= error_messages_for 'member' %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %>
|
||||
<br/>
|
||||
<span class=" c_grey mt3"><%=h time_tag(project.created_on) %>前</span>
|
||||
<span class=" c_grey mt3"><%=h time_tag(project.created_on) %></span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<%= f.text_field :identifier, :disabled => @repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
|
@ -35,14 +35,22 @@
|
|||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl">版本库名</th>
|
||||
<th class="w90 pr10 hidden fl">管理系统</th>
|
||||
<th class="w536 hidden fl">库路径</th>
|
||||
<th class="w490 hidden fl">库路径</th>
|
||||
<th class="w46 hidden fl"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl"><%= @gitlab_repository.identifier %></th>
|
||||
<th class="w90 pr10 hidden fl">Git</th>
|
||||
<th class="w536 hidden fl"><%=h @repos_url %></th>
|
||||
<th class="w490 hidden fl"><%=h @repos_url %></th>
|
||||
<th class="w46 hidden fl">
|
||||
<% if is_project_manager?(User.current.id, @project.id) %>
|
||||
<%= link_to "删除", destroy_repository_project_path(@project), :class => "c_blue", :remote => true %>
|
||||
<% else %>
|
||||
<%= "删除" %>
|
||||
<% end %>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<!--新版项目头部结束-->
|
||||
<div class="ke-block pro_new_info mb10 break_word" style="padding-bottom: 5px" >
|
||||
<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;">
|
||||
<% if @project.description.blank? %>
|
||||
<p class="break_word" style="padding-top:5px"><%= @project.name %></p>
|
||||
<p style="padding-top:5px"><%= @project.name %></p>
|
||||
<% else %>
|
||||
<p class="break_word" style="padding-top:5px"><%=h @project.description.html_safe %></p>
|
||||
<p style="padding-top:5px"><%=h @project.description.html_safe %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
|
||||
<div class="pro_new_info mb10">
|
||||
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
||||
<ul class="clear pro_new_users_box">
|
||||
<% @watchers.each do |user| %>
|
||||
<li class="clear">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像", :class => "pro_new_users fl mr5" %>
|
||||
<div class="fl mt5 clear">
|
||||
<%= link_to user.try(:show_name), user_path(user), :class => "pro_new_users mt5 fl" %>
|
||||
<!-- <span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%#= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %>-->
|
||||
<br/>
|
||||
<span class=" c_grey mt3 fl"><%=h time_tag(user.created_on) %></span>
|
||||
</div>
|
||||
<div class="st_list2" style="width:970px;">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
<% for user in @project.watcher_users %>
|
||||
<div class="st_boxlist">
|
||||
<a href="javascript:" class="st_img">
|
||||
<%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
|
||||
<%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %>
|
||||
<span class="fr c_grey"><%= format_date(user.created_on) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_followers)) -%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @watcher_pages, @watchers_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<% if @forked_project.nil? %>
|
||||
<%= select_tag :branch, options_for_select(@source_rev), :id => "pull_request_branch", :name => "target_branch", :value => "target_branch",:class => "fl PullReques_minselect ml5" %>
|
||||
<% else %>
|
||||
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" id="target_project_id" name="target_project_id" value="target_project_id" class="fl PullReques_minselect">
|
||||
<option id="source_project_name" name="<%= @project.id %>" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
||||
<option id="target_project_name" name="<%= @forked_project.id %>" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
||||
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>, <%= @project.id %>, <%= @project.forked_from_project_id %>);" id="target_project_id" name="target_project_id" value="target_project_id" class="fl PullReques_minselect">
|
||||
<option id="source_project_name" name="source_project_name" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
||||
<option id="target_project_name" name="forked_project_name" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
||||
</select>
|
||||
<select name="target_branch" id="pull_request_branch" class = "fl PullReques_minselect ml5" >
|
||||
<% @source_rev.each do |rev| %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% unless list.nil?%>
|
||||
<% for item in list %>
|
||||
<% for item in list %>
|
||||
<div class="courses_list line" id="fans_item_<%=item.id%>">
|
||||
<div class="courses_list_pic fl">
|
||||
<a href="<%= user_path(item) %>">
|
||||
|
@ -51,5 +51,5 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
}
|
||||
</script>
|
||||
<div class="courses_box" id="RSide" style="margin-left:0; margin-bottom:0; width:728px;">
|
||||
<div class="courses_box" id="RSide" style="margin-left:0; margin-bottom:0; width:728px;">
|
||||
<div class="courses_top mb10" id="<%= (@action == 'fans' || @action == 'visitor' ) ? 'nh_fans_list' : 'nh_wacth_list' %>">
|
||||
<% if @action == 'fans' %>
|
||||
<h2 class="courses_h2 fl">粉丝</h2>
|
||||
|
@ -41,5 +41,5 @@
|
|||
<!--<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>-->
|
||||
<!--</ul>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<% if( params[:object_type] == 'user') %>
|
||||
//点击头像下面的添加关注按钮
|
||||
<% if( params[:target_id] == params[:object_id] ) %>
|
||||
<% if @user %>
|
||||
$("#watch_user_btn_div").html("<%= escape_javascript render(:partial => "layouts/user_watch_btn", :locals => {:target => watched.first}) %>");
|
||||
<% end %>
|
||||
$("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>");
|
||||
$(".add_cancel_watch_<%= watched.first.id %>").html("<%= escape_javascript (render :partial => 'users/watch_btn_for_picture', :locals => {:user => watched.first}) %>");
|
||||
$(".fans_count_<%= watched.first.id %>").text("<%= watched.first.watcher_users.count.to_s %>");
|
||||
|
|
|
@ -226,7 +226,7 @@ zh:
|
|||
button_download: 下载
|
||||
button_more: "更多"
|
||||
button_delete: 删除
|
||||
button_unfollow: 取消关注
|
||||
button_unfollow: 已关注
|
||||
button_follow: 关注
|
||||
button_watch: 跟踪
|
||||
button_unwatch: 取消跟踪
|
||||
|
|
|
@ -52,7 +52,7 @@ zh:
|
|||
|
||||
label_agree_join_project: 同意加入
|
||||
label_apply_project: "加入"
|
||||
label_button_following: "添加关注"
|
||||
label_button_following: "关注"
|
||||
label_project_collect: 收藏
|
||||
label_project_collect_cancel: 取消收藏
|
||||
label_exit_project: 退出项目
|
||||
|
|
|
@ -783,6 +783,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'file', :action => 'file', :as => 'file'
|
||||
get 'statistics', :action => 'statistics', :as => 'statistics'
|
||||
get 'repository_tree_changes', :action => 'repository_tree_changes', :as => 'repository_tree_changes'
|
||||
get 'destroy_repository', :action => 'destroy_repository', :as => 'destroy_repository'
|
||||
|
||||
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
||||
get 'watcherlist', :action=> 'watcherlist'
|
||||
|
|
|
@ -19,6 +19,8 @@ module Gitlab
|
|||
ObjectifiedHash.new body
|
||||
elsif body.is_a? Array
|
||||
body.collect! { |e| ObjectifiedHash.new(e) }
|
||||
elsif body == true
|
||||
body
|
||||
else
|
||||
raise Error::Parsing.new "Couldn't parse a response body"
|
||||
end
|
||||
|
|
|
@ -1706,8 +1706,15 @@ function autoUrl(id){
|
|||
}
|
||||
return reStr ;
|
||||
});
|
||||
try{
|
||||
$(this).html(html);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
console.log(e.name + ": " + e.message);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
|
@ -1725,8 +1732,14 @@ function autoUrl(id){
|
|||
}
|
||||
return reStr ;
|
||||
});
|
||||
try{
|
||||
$("#"+id).html(html);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
console.log(e.name + ": " + e.message);
|
||||
}
|
||||
}
|
||||
if(!(!!window.ActiveXObject || "ActiveXObject" in window)){
|
||||
autoMedia(id);
|
||||
}
|
||||
|
|
|
@ -665,18 +665,30 @@ function search_tag_attachment(url,tag_name,q,course_id,sort)
|
|||
}
|
||||
|
||||
|
||||
function choice_branch(name, branch, source_rev, forked_rev) {
|
||||
switch (name) {
|
||||
case "source_project_name" :
|
||||
function choice_branch(name, branch, source_rev, forked_rev, project_id, project_forked_from_id) {
|
||||
if (name==project_id){
|
||||
var branchOptions = source_rev;
|
||||
break;
|
||||
case "forked_project_name" :
|
||||
var branchOptions = forked_rev;
|
||||
break;
|
||||
default:
|
||||
var branchOptions = source_rev;
|
||||
break;
|
||||
}
|
||||
else if (name == project_forked_from_id){
|
||||
var branchOptions = forked_rev;
|
||||
}
|
||||
else{
|
||||
var branchOptions = source_rev;
|
||||
}
|
||||
|
||||
// switch (name) {
|
||||
// case project_id :
|
||||
// alert("project_id" + project_id);
|
||||
// var branchOptions = source_rev;
|
||||
// break;
|
||||
// case project_forked_from_id :
|
||||
// alert("project_forked_from_id"+project_forked_from_id);
|
||||
// var branchOptions = forked_rev;
|
||||
// break;
|
||||
// default:
|
||||
// var branchOptions = source_rev;
|
||||
// break;
|
||||
// }
|
||||
|
||||
branch.options.length = 0;
|
||||
for (var i = 0; i < branchOptions.length; i++) {
|
||||
|
|
|
@ -233,6 +233,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
|||
.w20{ width:20px;}
|
||||
.w40{width: 40px;}
|
||||
.w45{ width: 45px;}
|
||||
.w46{ width: 46px;}
|
||||
.w48{width:48px;}
|
||||
.w50 {width:50px;}
|
||||
.w56 {width:56px;}
|
||||
|
|
|
@ -867,6 +867,7 @@ a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-
|
|||
a.pro_new_topbtn{ padding: 3px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;}
|
||||
a.pro_new_topbtn_left { padding: 3px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333; }
|
||||
a:hover.pro_new_topbtn_left{background-image: linear-gradient(#ededed, #dddddd);}
|
||||
a.pro_new_grey_topbtn_left{padding: 3px 10px; font-size: 12px;line-height: 20px; background: #fff; border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #888888; }
|
||||
.pro_new_topnav ul{border-bottom: 3px solid #fff; height: 30px; line-height: 30px;}
|
||||
.pro_new_topnav ul li{ float: left;padding:0 15px; height: 30px; line-height: 30px;text-align: center; }
|
||||
.pro_new_topnav_active{border-bottom: 3px solid #3b94d6; }
|
||||
|
@ -1028,7 +1029,7 @@ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; co
|
|||
.pro_new_users_box{ margin:0 10px;}
|
||||
.pro_new_users_box li{ width:25%; float: left; margin:10px 0;}
|
||||
.pro_new_users{ }
|
||||
a.pro_new_users { max-width:80px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; word-break:break-all; display: inline-block; font-weight: bold; color: #666;}
|
||||
a.pro_new_users { max-width:130px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; word-break:break-all; display: inline-block; font-weight: bold; color: #666;}
|
||||
a:hover.pro_new_users {color: #3b94d6}
|
||||
.pro_new_users img{ width:40px;height:40px; border: 3px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
|
||||
.pro_new_users img:hover{border: 3px solid #e6e6e6;}
|
||||
|
|
Loading…
Reference in New Issue