| 1 |
|
<% if @project.repositories.any? %>
|
| 2 |
|
<table class="list">
|
| 3 |
|
<thead>
|
| 4 |
|
<tr>
|
| 5 |
|
<th><%= l(:field_identifier) %></th>
|
| 6 |
|
<th><%= l(:field_repository_is_default) %></th>
|
| 7 |
|
<th><%= l(:label_scm) %></th>
|
| 8 |
|
<th><%= l(:label_repository) %></th>
|
| 9 |
|
<th></th>
|
| 10 |
|
</tr>
|
| 11 |
|
</thead>
|
| 12 |
|
<tbody>
|
| 13 |
|
<% @project.repositories.sort.each do |repository| %>
|
| 14 |
|
<tr class="<%= cycle 'odd', 'even' %>">
|
| 15 |
|
<td>
|
| 16 |
|
<%= link_to repository.identifier,
|
| 17 |
|
{:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
|
| 18 |
|
</td>
|
| 19 |
|
<td align="center"><%= checked_image repository.is_default? %></td>
|
| 20 |
|
<td><%=h repository.scm_name %></td>
|
| 21 |
|
<td><%=h repository.url %></td>
|
| 22 |
|
<td class="buttons">
|
| 23 |
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
| 24 |
|
<%= link_to(l(:label_user_plural), committers_repository_path(repository),
|
|
1 |
|
|
2 |
<%= javascript_include_tag 'repository' %>
|
|
3 |
|
|
4 |
<%= form_for @repository,
|
|
5 |
:as => :repository,
|
|
6 |
:url => { :controller => 'repositories', :action => 'edit', :id => @project },
|
|
7 |
:remote => true,
|
|
8 |
:method => 'post' do |f| %>
|
|
9 |
|
|
10 |
<%= error_messages_for 'repository' %>
|
|
11 |
|
|
12 |
<div class="box tabular">
|
|
13 |
|
|
14 |
<p>
|
|
15 |
<% if @repository %>
|
|
16 |
<%= l(:text_settings_repo_explanation).html_safe %></ br>
|
|
17 |
<% if @repository.is_external %>
|
|
18 |
<p><%= l(:text_settings_repo_is_external).html_safe %></ br>
|
|
19 |
<% else %>
|
|
20 |
<p><%= l(:text_settings_repo_is_internal).html_safe %></ br>
|
|
21 |
<% end %>
|
|
22 |
</p>
|
|
23 |
|
|
24 |
|
|
25 |
<p>
|
|
26 |
<%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
|
|
27 |
<%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %>
|
|
28 |
<br/><em><%= l(:setting_external_repository).html_safe %></em>
|
|
29 |
</p>
|
|
30 |
|
|
31 |
<p>
|
|
32 |
<%= label_tag('repository_external_url', l(:label_repository_external_url)) %>
|
|
33 |
<%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %>
|
|
34 |
<br/><em><%= l(:setting_external_repository_url).html_safe %></em>
|
|
35 |
</p>
|
|
36 |
|
|
37 |
<p><%= l(:text_settings_repo_need_help).html_safe %></p>
|
|
38 |
|
|
39 |
</div>
|
|
40 |
|
|
41 |
<div class="contextual">
|
|
42 |
<% if @repository && !@repository.new_record? %>
|
|
43 |
<%= link_to(l(:label_user_plural),
|
|
44 |
{
|
|
45 |
:controller => 'repositories',
|
|
46 |
:action => 'committers',
|
|
47 |
:id => @project
|
|
48 |
},
|
| 25 |
49 |
:class => 'icon icon-user') %>
|
| 26 |
|
<%= link_to(l(:button_edit), edit_repository_path(repository),
|
| 27 |
|
:class => 'icon icon-edit') %>
|
| 28 |
|
<%= delete_link repository_path(repository) %>
|
| 29 |
|
<% end %>
|
| 30 |
|
</td>
|
| 31 |
|
</tr>
|
| 32 |
|
<% end %>
|
| 33 |
|
</tbody>
|
| 34 |
|
</table>
|
|
50 |
<% end %>
|
|
51 |
</div>
|
|
52 |
|
|
53 |
<%= submit_tag(l(:button_save)) %>
|
|
54 |
|
| 35 |
55 |
<% else %>
|
| 36 |
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
56 |
<%= l(:text_settings_repo_creation).html_safe %></ br>
|
| 37 |
57 |
<% end %>
|
| 38 |
58 |
|
| 39 |
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
| 40 |
|
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
| 41 |
59 |
<% end %>
|