私有项目版本库全休修改

This commit is contained in:
huang 2015-05-13 16:24:46 +08:00
parent a8d19a119a
commit c148a8a145
3 changed files with 18 additions and 10 deletions

View File

@ -39,13 +39,21 @@
</div> </div>
<% end %> <% end %>
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %> <%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
<% unless @project.hidden_repo || @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %> <% unless @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %>
<div class="subNav"> <% if @project.hidden_repo || !@project.is_public? %>
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %> <% if User.current.member_of?(@project) %>
<a class="subnav_num">(<%= @project.repositories.count %>)</a> <div class="subNav">
</div> <%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<% end %><!--meny end --> <a class="subnav_num">(<%= @project.repositories.count %>)</a>
</div>
<% end %>
<% else %>
<div class="subNav">
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
</div>
<% end %>
<% end %>
<!-- more --> <!-- more -->
<div class="subNav subNav_jiantou" onclick="$('#navContent').toggle(500);" id="expand_tools_expand"><%= l(:label_project_more) %></div> <div class="subNav subNav_jiantou" onclick="$('#navContent').toggle(500);" id="expand_tools_expand"><%= l(:label_project_more) %></div>
<ul class="navContent" id="navContent"> <ul class="navContent" id="navContent">

View File

@ -75,7 +75,7 @@
<% unless judge_main_repository(@project) %> <% unless judge_main_repository(@project) %>
<li> <li>
<label class="label02"><%=l(:field_repository_is_default)%></label> <label class="label02"><%=l(:field_repository_is_default)%></label>
<%= f.check_box :is_default, :label => "" %></p> <%= f.check_box :is_default, :label => "", :no_label => true %></p>
</li> </li>
<% end %> <% end %>
<li > <li >

View File

@ -112,8 +112,8 @@
<%= l(:label_latest_revision_plural) %> <%= l(:label_latest_revision_plural) %>
</h3> </h3>
<%= render :partial => 'revisions', <%= render :partial => 'revisions',
:locals => {:project => @project, :path => @path, :locals => {:project => @project, :path => @path,
:revisions => @changesets, :entry => nil} %> :revisions => @changesets, :entry => nil} %>
<% end %> <% end %>
<p style="padding-top: 10px;"> <p style="padding-top: 10px;">
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)