Añade el plugin Redmine Git Server 0.4
This commit is contained in:
parent
525527a55b
commit
4b46a7472e
30 changed files with 485 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
<% user = User.current %>
|
||||
<% write_access = user.allowed_to?(:commit_access, @project) %>
|
||||
<% read_access = user.allowed_to?(:view_changesets, @project) %>
|
||||
<% if @project.module_enabled?("git_server") and read_access %>
|
||||
|
|
||||
<%= content_tag :div, class: 'drdn clone-wrapper' do %>
|
||||
<%= button_tag l(:clone), type: 'button', class: 'drdn-trigger clone-button' %>
|
||||
<%= content_tag :div, class: 'drdn-content clone-dropdown' do %>
|
||||
<% protocol = Setting['protocol'] %>
|
||||
<h4><%= l(:clone_with_protocol, protocol: protocol.upcase) %></h4>
|
||||
<%= render 'clone_form' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -0,0 +1,28 @@
|
|||
<% user = User.current %>
|
||||
<% write_access = user.allowed_to?(:commit_access, @project) %>
|
||||
<% read_access = user.allowed_to?(:view_changesets, @project) %>
|
||||
<%= content_tag :div, class: 'clone-form' do %>
|
||||
<% protocol = Setting['protocol'] %>
|
||||
<p>
|
||||
<%= l(:use_git_with_this_web_url) %>
|
||||
<% if write_access %>
|
||||
<%= l(:git_read_write_access) %>
|
||||
<% else %>
|
||||
<%= l(:git_read_only_access) %>
|
||||
<% end %>
|
||||
</p>
|
||||
<%= content_tag :code, class: 'clone-input-group' do %>
|
||||
<% url = url_for(
|
||||
controller: 'repositories',
|
||||
action: 'show',
|
||||
id: @project.identifier,
|
||||
repository_id: @repository.identifier,
|
||||
user: User.current.login,
|
||||
password: '',
|
||||
only_path: false,
|
||||
protocol: protocol).sub(':@', '@') %>
|
||||
<%= text_field_tag 'url', url, readonly: true %>
|
||||
<%= button_tag image_tag('../plugin_assets/redmine_git_server/images/copy-to-clipboard.png') %>
|
||||
<% end %>
|
||||
<div class="flash notice"><%= l(:url_copied) %></div>
|
||||
<% end %>
|
|
@ -0,0 +1,10 @@
|
|||
<% user = User.current %>
|
||||
<% write_access = user.allowed_to?(:commit_access, @project) %>
|
||||
<% read_access = user.allowed_to?(:view_changesets, @project) %>
|
||||
<div class="flash warning">
|
||||
<%= l(:empty_repository) %>
|
||||
</div>
|
||||
|
||||
<div class="empty-clone-form">
|
||||
<%= render 'clone_form' %>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue