Skip to content

Commit 0b3e193

Browse files
author
root
committed
Display link to repository browser in edit view
1 parent 5b9a0a2 commit 0b3e193

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

Diff for: app/views/projects/settings/_repositories.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<% end %>
2525
</td>
2626
<td>
27-
<%=link_to h(repository.url), {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} %>
27+
<%=link_to h(repository.url), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} %>
2828
</td>
2929
<td>
3030
<span class="label label-info"><%= repository.extra[:default_branch] %></span>

Diff for: app/views/repositories/_form.html.erb

+9-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<div id="git_hosting_settings" class="box tabular">
3131

32-
<div style="display: block; float: left; width: 40%;">
32+
<div class="split">
3333
<p>
3434
<% if @repository.new_record? %>
3535
<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
@@ -77,9 +77,16 @@
7777
<% else %>
7878
<p><%= f.text_field :identifier %></p>
7979
<% end %>
80+
81+
<% if @repository && @repository.is_a?(Repository::Git) && !@repository.new_record? %>
82+
<p>
83+
<label><%= l(:label_browse_repository) %></label>
84+
<%=link_to h(@repository.url), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => @repository.identifier_param} %>
85+
</p>
86+
<% end %>
8087
</div>
8188

82-
<div style="display: block; float: left; width: 40%;">
89+
<div class="split">
8390
<% button_disabled = true %>
8491
<% if @repository %>
8592
<% button_disabled = !@repository.class.scm_available %>

Diff for: assets/stylesheets/application.css

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ REPOSITORY EDIT
7272
padding-right: 10px;
7373
}
7474

75+
#git_hosting_settings div.split { display: block; float: left; width: 40%; }
76+
7577

7678
/*
7779
REPOSITORY VIEW

Diff for: config/locales/plugin_interface/en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ en:
204204
label_git_notify: Git Notifications
205205
label_repository_default_branch: Repository default branch
206206
label_init_repo_with_readme: Initialize this repository with a README
207+
label_browse_repository: Browse repository
207208

208209
# Repository list view
209210
label_repository_enabled_capabilities: Repository Enabled Capabilities

Diff for: config/locales/plugin_interface/fr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ fr:
204204
label_git_notify: Notifications Git
205205
label_repository_default_branch: Branche par défaut
206206
label_init_repo_with_readme: Initialiser le dépôt avec un fichier README
207+
label_browse_repository: Parcourir les sources
207208

208209
# Repository list view
209210
label_repository_enabled_capabilities: Fonctionnalité activées du dépôt

0 commit comments

Comments
 (0)