Merge branch 'dev_newproject' into develop
This commit is contained in:
commit
0b4caa3ebd
|
@ -671,7 +671,7 @@ class ProjectsController < ApplicationController
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
begin
|
begin
|
||||||
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_path)
|
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_path)
|
||||||
# result.time = distance_of_time_in_words(result.time, Time.now)
|
result = {:message => result.message, :author_name => User.find_by_mail(result.author_email).nil? ? result.author_email : User.find_by_mail(result.author_email).show_name, :time => distance_of_time_in_words(result.time, Time.now)}
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts e
|
puts e
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,12 +40,12 @@ class RepositoriesController < ApplicationController
|
||||||
# before_filter :connect_gitlab, :only => [:quality_analysis, :commit_diff]
|
# before_filter :connect_gitlab, :only => [:quality_analysis, :commit_diff]
|
||||||
|
|
||||||
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
||||||
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff, :project_archive, :quality_analysis]
|
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis]
|
||||||
# 版本库新增权限
|
# 版本库新增权限
|
||||||
before_filter :show_rep, :only => [:show]
|
# before_filter :show_rep, :only => [:show, :stats, :revisions, :revision, :diff, :commit_diff ]
|
||||||
accept_rss_auth :revisions
|
accept_rss_auth :revisions
|
||||||
# hidden repositories filter // 隐藏代码过滤器
|
# hidden repositories filter // 隐藏代码过滤器
|
||||||
before_filter :check_hidden_repo, :only => [:stats, :revisions, :revision, :diff ]
|
# before_filter :check_hidden_repo, :only => [:stats, :revisions, :revision, :diff ]
|
||||||
helper :repositories
|
helper :repositories
|
||||||
include RepositoriesHelper
|
include RepositoriesHelper
|
||||||
helper :project_score
|
helper :project_score
|
||||||
|
@ -689,10 +689,7 @@ update
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_rep
|
def show_rep
|
||||||
if !User.current.member_of?(@project) && @project.hidden_repo
|
visible_repository?(@project)
|
||||||
render_403
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_repository
|
def find_repository
|
||||||
|
@ -948,15 +945,4 @@ update
|
||||||
graph.burn
|
graph.burn
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def check_hidden_repo
|
|
||||||
project = Project.find(params[:id])
|
|
||||||
if !User.current.member_of?(project)
|
|
||||||
if project.hidden_repo
|
|
||||||
#render_403
|
|
||||||
end
|
|
||||||
end
|
|
||||||
rescue ActiveRecord::RecordNotFound
|
|
||||||
render_404
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -49,6 +49,11 @@ module ApplicationHelper
|
||||||
(hidden_info && hidden_info.value == "1") ? true : false
|
(hidden_info && hidden_info.value == "1") ? true : false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 获取当前用户的fork数量
|
||||||
|
def get_fork_from_project forked_from_project_id
|
||||||
|
Project.find(forked_from_project_id)
|
||||||
|
end
|
||||||
|
|
||||||
# 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换
|
# 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换
|
||||||
def get_user_by_mail mail
|
def get_user_by_mail mail
|
||||||
user = User.find_by_mail(mail)
|
user = User.find_by_mail(mail)
|
||||||
|
|
|
@ -21,6 +21,68 @@ include AvatarHelper
|
||||||
include StudentWorkHelper
|
include StudentWorkHelper
|
||||||
include ApiHelper
|
include ApiHelper
|
||||||
module ProjectsHelper
|
module ProjectsHelper
|
||||||
|
|
||||||
|
# 时间转换
|
||||||
|
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
|
||||||
|
options = {
|
||||||
|
:scope => :'datetime.distance_in_words',
|
||||||
|
}.merge!(options)
|
||||||
|
|
||||||
|
from_time = from_time.to_time if from_time.respond_to?(:to_time)
|
||||||
|
to_time = to_time.to_time if to_time.respond_to?(:to_time)
|
||||||
|
distance = (to_time.to_f - from_time.to_f).abs
|
||||||
|
distance_in_minutes = (distance / 60.0).round
|
||||||
|
distance_in_seconds = distance.round
|
||||||
|
|
||||||
|
I18n.with_options :locale => options[:locale], :scope => options[:scope] do |locale|
|
||||||
|
case distance_in_minutes
|
||||||
|
when 0..1
|
||||||
|
return distance_in_minutes == 0 ?
|
||||||
|
locale.t(:less_than_x_minutes, :count => 1) :
|
||||||
|
locale.t(:x_minutes, :count => distance_in_minutes) unless include_seconds
|
||||||
|
|
||||||
|
case distance_in_seconds
|
||||||
|
when 0..4 then locale.t :less_than_x_seconds, :count => 5
|
||||||
|
when 5..9 then locale.t :less_than_x_seconds, :count => 10
|
||||||
|
when 10..19 then locale.t :less_than_x_seconds, :count => 20
|
||||||
|
when 20..39 then locale.t :half_a_minute
|
||||||
|
when 40..59 then locale.t :less_than_x_minutes, :count => 1
|
||||||
|
else locale.t :x_minutes, :count => 1
|
||||||
|
end
|
||||||
|
|
||||||
|
when 2..44 then locale.t :x_minutes, :count => distance_in_minutes
|
||||||
|
when 45..89 then locale.t :about_x_hours, :count => 1
|
||||||
|
when 90..1439 then locale.t :about_x_hours, :count => (distance_in_minutes.to_f / 60.0).round
|
||||||
|
when 1440..2519 then locale.t :x_days, :count => 1
|
||||||
|
when 2520..43199 then locale.t :x_days, :count => (distance_in_minutes.to_f / 1440.0).round
|
||||||
|
when 43200..86399 then locale.t :about_x_months, :count => 1
|
||||||
|
when 86400..525599 then locale.t :x_months, :count => (distance_in_minutes.to_f / 43200.0).round
|
||||||
|
else
|
||||||
|
fyear = from_time.year
|
||||||
|
fyear += 1 if from_time.month >= 3
|
||||||
|
tyear = to_time.year
|
||||||
|
tyear -= 1 if to_time.month < 3
|
||||||
|
leap_years = (fyear > tyear) ? 0 : (fyear..tyear).count{|x| Date.leap?(x)}
|
||||||
|
minute_offset_for_leap_year = leap_years * 1440
|
||||||
|
# Discount the leap year days when calculating year distance.
|
||||||
|
# e.g. if there are 20 leap year days between 2 dates having the same day
|
||||||
|
# and month then the based on 365 days calculation
|
||||||
|
# the distance in years will come out to over 80 years when in written
|
||||||
|
# english it would read better as about 80 years.
|
||||||
|
minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
|
||||||
|
remainder = (minutes_with_offset % 525600)
|
||||||
|
distance_in_years = (minutes_with_offset.div 525600)
|
||||||
|
if remainder < 131400
|
||||||
|
locale.t(:about_x_years, :count => distance_in_years)
|
||||||
|
elsif remainder < 394200
|
||||||
|
locale.t(:over_x_years, :count => distance_in_years)
|
||||||
|
else
|
||||||
|
locale.t(:almost_x_years, :count => distance_in_years + 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def link_to_version(version, options = {})
|
def link_to_version(version, options = {})
|
||||||
return '' unless version && version.is_a?(Version)
|
return '' unless version && version.is_a?(Version)
|
||||||
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02"
|
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02"
|
||||||
|
|
|
@ -27,6 +27,11 @@ module RepositoriesHelper
|
||||||
REPO_IP_ADDRESS = Setting.host_repository
|
REPO_IP_ADDRESS = Setting.host_repository
|
||||||
REPO_GITLAB_ADDRESS = "git.trustie.net"
|
REPO_GITLAB_ADDRESS = "git.trustie.net"
|
||||||
|
|
||||||
|
# 因为gitlab的提交总数不是实时同步的,说以取总数用两种方法
|
||||||
|
def choise_commit_count git_count, pro_count
|
||||||
|
git_count > pro_count ? git_count : pro_count
|
||||||
|
end
|
||||||
|
|
||||||
# 某个成员不能拥有同名版本库,不同的成员可以创建同名版本库
|
# 某个成员不能拥有同名版本库,不同的成员可以创建同名版本库
|
||||||
def is_sigle_identifier?(user_id, iden)
|
def is_sigle_identifier?(user_id, iden)
|
||||||
projects = Project.where("user_id =?",user_id)
|
projects = Project.where("user_id =?",user_id)
|
||||||
|
|
|
@ -126,7 +126,7 @@ module UsersHelper
|
||||||
when 4
|
when 4
|
||||||
"婉拒您"
|
"婉拒您"
|
||||||
when 5,3,2,1,7
|
when 5,3,2,1,7
|
||||||
"申请:"
|
"申请:"
|
||||||
when 6
|
when 6
|
||||||
"同意您"
|
"同意您"
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,9 +17,16 @@
|
||||||
<div class="fr clear mr15">
|
<div class="fr clear mr15">
|
||||||
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
|
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="pro_new_topnav mt15">
|
<% unless @project.forked_from_project_id.nil? %>
|
||||||
|
<div class="fl pro_new_name ml15 clear mt5">
|
||||||
|
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl" %>
|
||||||
|
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl" %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="pro_new_topnav mt8">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="project_menu_01">
|
<li id="project_menu_01">
|
||||||
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
||||||
|
@ -79,6 +86,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--新版项目头部结束-->
|
<!--新版项目头部结束-->
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<% memo = Memo.where(:id => 1168).first %>
|
<% memo = Memo.where(:id => 1168).first %>
|
||||||
<% unless memo.nil? %>
|
<% unless memo.nil? %>
|
||||||
<li class="navHomepageMenu fl mr30">
|
<li class="navHomepageMenu fl mr30">
|
||||||
<%= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
<%= link_to "帮助中心", "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
||||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
||||||
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
|
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
|
||||||
<!--<%# else %>-->
|
<!--<%# else %>-->
|
||||||
|
|
||||||
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
|
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
|
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="postThemeWrap">
|
<div class="postThemeWrap">
|
||||||
<% if @memo.author.id == User.current.id%>
|
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
||||||
<div class="homepagePostSetting">
|
<div class="homepagePostSetting">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
@ -91,6 +91,9 @@
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes">
|
||||||
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.show_name%></a><%= format_date(reply.created_at) %></div>
|
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.show_name%></a><%= format_date(reply.created_at) %></div>
|
||||||
<div class="homepagePostReplyContent break_word" id="activity_description_<%= reply.id %>"><%= reply.content.gsub(/script/, "script ").html_safe %></div>
|
<div class="homepagePostReplyContent break_word" id="activity_description_<%= reply.id %>"><%= reply.content.gsub(/script/, "script ").html_safe %></div>
|
||||||
|
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
||||||
|
<%= link_to "删除", forum_memo_path(@memo.forum, reply), :class => "fr mt-10 mb10", :method => "delete", :confirm => l(:text_are_you_sure) %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to "#{@project.members.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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<!--项目创建者不能退出项目-->
|
<!--项目创建者不能退出项目-->
|
||||||
<% if User.current.id != @project.user_id %>
|
<% if User.current.id != @project.user_id %>
|
||||||
<%= exit_project_link(@project) %>
|
<%= exit_project_link(@project) %>
|
||||||
<%= link_to "#{@project.members.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 => "项目成员" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
|
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<label class="fl"> 默认分支 :</label>
|
<label class="fl"> 默认分支 :</label>
|
||||||
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "ml5" %>
|
<%= select_tag :branch, options_for_select(["#{@gitlab_default_branch}"]+ @branch_names, @rev), :id => 'branch', :class => "ml5", :style => "height: 28px;" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="pro_new_prompt ml15 mr15 mb10"><p><%= l(:milestone_no_data) %></p></div>
|
<div class="pro_new_prompt ml15 mr15 mb10"><p><%= l(:milestone_no_data) %></p></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class=" sy_new_tchbox clear " >
|
<div class=" sy_new_tchbox clear " >
|
||||||
<a href="javascript:void(0);" class=" sy_btn_green mb10" onclick="pro_st_show_ban1();">新建里程碑</a>
|
<a href="javascript:void(0);" class=" sy_btn_green mb10 fr" onclick="pro_st_show_ban1();">新建里程碑</a>
|
||||||
<%= render :partial => 'projects/settings/new_versions_form', :locals => {:project => @project} %>
|
<%= render :partial => 'projects/settings/new_versions_form', :locals => {:project => @project} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -25,16 +25,17 @@
|
||||||
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
||||||
</td>
|
</td>
|
||||||
<div id="children_tree">
|
<div id="children_tree">
|
||||||
<td class="tree-comments c_grey hidden">
|
|
||||||
<div class="hidden" id="changes_message_<%= tr_id %>">
|
|
||||||
<%#= (latest_changes.message) if latest_changes %>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="tree-author c_grey">
|
<td class="tree-author c_grey">
|
||||||
<div class="hidden" id="changes_author_<%= tr_id %>">
|
<div class="hidden" id="changes_author_<%= tr_id %>">
|
||||||
<%#= (latest_changes.author_name) if latest_changes %>
|
<%#= (latest_changes.author_name) if latest_changes %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="tree-comments c_grey hidden">
|
||||||
|
<div class="hidden" id="changes_message_<%= tr_id %>">
|
||||||
|
<%#= (latest_changes.message) if latest_changes %>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td class="tree-age c_grey">
|
<td class="tree-age c_grey">
|
||||||
<div class="hidden" id="changes_time_<%= tr_id %>">
|
<div class="hidden" id="changes_time_<%= tr_id %>">
|
||||||
<%# 为了转换UTC时间,时差8小时 %>
|
<%# 为了转换UTC时间,时差8小时 %>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<% if @changesets_latest_coimmit %>
|
<% if @changesets_latest_coimmit %>
|
||||||
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
||||||
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||||
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to get_user_by_mail(@changesets_latest_coimmit.author_email).show_name, user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
||||||
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
|
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
|
||||||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||||
</span>
|
</span>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||||
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交
|
<%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -195,11 +195,11 @@ Redmine::AccessControl.map do |map|
|
||||||
# map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
|
# map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
|
||||||
# end
|
# end
|
||||||
|
|
||||||
map.project_module :news do |map|
|
# map.project_module :news do |map|
|
||||||
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
|
# map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
|
||||||
map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
|
# map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
|
||||||
map.permission :comment_news, {:comments => [:create, :reply]}
|
# map.permission :comment_news, {:comments => [:create, :reply]}
|
||||||
end
|
# end
|
||||||
|
|
||||||
map.contest_module :contestnotifications do |map|
|
map.contest_module :contestnotifications do |map|
|
||||||
map.permission :manage_contestnotifications, {:contestnotifications => [:new, :create, :edit, :update, :destroy], :notificationcomments => [:destroy]}, :require => :member,:belong_to_contest => true
|
map.permission :manage_contestnotifications, {:contestnotifications => [:new, :create, :edit, :update, :destroy], :notificationcomments => [:destroy]}, :require => :member,:belong_to_contest => true
|
||||||
|
@ -219,17 +219,17 @@ Redmine::AccessControl.map do |map|
|
||||||
map.permission :view_files, {:files => :index, :versions => :download}, :read => true
|
map.permission :view_files, {:files => :index, :versions => :download}, :read => true
|
||||||
end
|
end
|
||||||
|
|
||||||
map.project_module :wiki do |map|
|
# map.project_module :wiki do |map|
|
||||||
map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
|
# map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
|
||||||
map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
|
# map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
|
||||||
map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member
|
# map.permission :delete_wiki_pages, {:wiki => [:destroy, :destroy_version]}, :require => :member
|
||||||
map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
|
# map.permission :view_wiki_pages, {:wiki => [:index, :show, :special, :date_index]}, :read => true
|
||||||
map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
|
# map.permission :export_wiki_pages, {:wiki => [:export]}, :read => true
|
||||||
map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true
|
# map.permission :view_wiki_edits, {:wiki => [:history, :diff, :annotate]}, :read => true
|
||||||
map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment]
|
# map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment]
|
||||||
map.permission :delete_wiki_pages_attachments, {}
|
# map.permission :delete_wiki_pages_attachments, {}
|
||||||
map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
|
# map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
|
||||||
end
|
# end
|
||||||
|
|
||||||
map.project_module :repository do |map|
|
map.project_module :repository do |map|
|
||||||
map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member
|
map.permission :manage_repository, {:repositories => [:new, :create, :edit, :update, :committers, :destroy]}, :require => :member
|
||||||
|
|
|
@ -160,9 +160,9 @@ div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}
|
||||||
.repos_files ul:hover{ background:#ffffdd;}
|
.repos_files ul:hover{ background:#ffffdd;}
|
||||||
.repos_t_c li{ text-align:center;}
|
.repos_t_c li{ text-align:center;}
|
||||||
.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;}
|
.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;}
|
||||||
.tree-age{width:20%; text-align:right;}
|
.tree-age{width:15%; text-align:right;}
|
||||||
.tree-author{width:10%; text-align:left;}
|
.tree-author{width:10%; text-align:left;}
|
||||||
.tree-comments{width:35%; text-align:left;}
|
.tree-comments{width:50%; text-align:left;}
|
||||||
|
|
||||||
/* 里程碑 */
|
/* 里程碑 */
|
||||||
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
|
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
|
||||||
|
@ -368,7 +368,7 @@ div.changeset { border-bottom: 1px solid #ddd; }
|
||||||
tr.entry { border: 1px solid #DDD; }
|
tr.entry { border: 1px solid #DDD; }
|
||||||
tr.entry td { white-space: nowrap; }
|
tr.entry td { white-space: nowrap; }
|
||||||
tr.entry td.filename { width: 30%; }
|
tr.entry td.filename { width: 30%; }
|
||||||
tr.entry td.filename_no_report { width: 40%; }
|
tr.entry td.filename_no_report { width: 25%; }
|
||||||
tr.entry td.size { text-align: right; font-size: 90%; }
|
tr.entry td.size { text-align: right; font-size: 90%; }
|
||||||
tr.entry td.revision, tr.entry td.author { text-align: center; }
|
tr.entry td.revision, tr.entry td.author { text-align: center; }
|
||||||
tr.entry td.age { text-align: right; }
|
tr.entry td.age { text-align: right; }
|
||||||
|
@ -856,6 +856,7 @@ input.pro_newissue_con_check{ width: 15px; height: 15px;}
|
||||||
.icons_newpro_lock{width: 22px; height: 23px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -113px no-repeat;}
|
.icons_newpro_lock{width: 22px; height: 23px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -113px no-repeat;}
|
||||||
.pro_new_name{width: 600px; }
|
.pro_new_name{width: 600px; }
|
||||||
a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px; cursor: default;}
|
a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px; cursor: default;}
|
||||||
|
a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px; cursor: default;}
|
||||||
a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
||||||
a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
||||||
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{ 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;}
|
||||||
|
|
|
@ -215,12 +215,12 @@
|
||||||
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||||
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||||
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
||||||
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
||||||
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
|
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
|
||||||
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
|
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
|
||||||
.mt1 {margin-top:1px;}
|
.mt1 {margin-top:1px;}
|
||||||
.mt2 {margin-top:2px;}
|
.mt2 {margin-top:2px;}
|
||||||
.commit_content_dec{width: 400px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
|
.commit_content_dec{width: 500px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
|
||||||
|
|
||||||
/*提交信息列表*/
|
/*提交信息列表*/
|
||||||
.col-md-10 {
|
.col-md-10 {
|
||||||
|
|
Loading…
Reference in New Issue