# HG changeset patch # User Chris Cannam # Date 1374146505 -3600 # Node ID 45dbcd39b9e9f1b6520b970db4eb0e37e188a15d # Parent 0f5c32bfd33e91367aac53787a7ad7db7994e03b# Parent a48be8a8bcbada2ec3d66f71fbddf9bedf7a1eb1 Merge from branch cannam diff -r 0f5c32bfd33e -r 45dbcd39b9e9 app/controllers/projects_controller.rb --- a/app/controllers/projects_controller.rb Wed Jul 03 09:57:31 2013 +0100 +++ b/app/controllers/projects_controller.rb Thu Jul 18 12:21:45 2013 +0100 @@ -196,6 +196,7 @@ @issue_category ||= IssueCategory.new @member ||= @project.members.new @trackers = Tracker.sorted.all + @repository ||= @project.repository @wiki ||= @project.wiki end diff -r 0f5c32bfd33e -r 45dbcd39b9e9 app/models/repository.rb --- a/app/models/repository.rb Wed Jul 03 09:57:31 2013 +0100 +++ b/app/models/repository.rb Thu Jul 18 12:21:45 2013 +0100 @@ -51,6 +51,8 @@ 'password', 'path_encoding', 'log_encoding', + 'is_external', + 'external_url', 'is_default' safe_attributes 'url', diff -r 0f5c32bfd33e -r 45dbcd39b9e9 app/views/issues/_form.html.erb --- a/app/views/issues/_form.html.erb Wed Jul 03 09:57:31 2013 +0100 +++ b/app/views/issues/_form.html.erb Thu Jul 18 12:21:45 2013 +0100 @@ -43,15 +43,3 @@ <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> <% end %> - -<% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> -

-<% @issue.project.users.sort.each do |user| -%> - -<% end -%> -

-<% end %> - -<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> - -<%= wikitoolbar_for 'issue_description' %> diff -r 0f5c32bfd33e -r 45dbcd39b9e9 app/views/projects/settings/_repositories.html.erb --- a/app/views/projects/settings/_repositories.html.erb Wed Jul 03 09:57:31 2013 +0100 +++ b/app/views/projects/settings/_repositories.html.erb Thu Jul 18 12:21:45 2013 +0100 @@ -1,41 +1,61 @@ -<% if @project.repositories.any? %> - - - - - - - - - - - - <% @project.repositories.sort.each do |repository| %> - - - - - - - - <% end %> - -
<%= l(:field_identifier) %><%= l(:field_repository_is_default) %><%= l(:label_scm) %><%= l(:label_repository) %>
- <%= link_to repository.identifier, - {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %> - <%= checked_image repository.is_default? %><%=h repository.scm_name %><%=h repository.url %> - <% if User.current.allowed_to?(:manage_repository, @project) %> - <%= link_to(l(:label_user_plural), committers_repository_path(repository), + +<%= javascript_include_tag 'repository' %> + +<% if @repository %> + +<%= form_for @repository, + :as => :repository, + :remote => true, + :url => { :controller => 'repositories', :action => 'update', :id => @repository }, + :method => 'put' do |f| %> + +<%= error_messages_for 'repository' %> + +
+ +

+ <%= l(:text_settings_repo_explanation).html_safe %> + <% if @repository.is_external %> +

<%= l(:text_settings_repo_is_external).html_safe %> + <% else %> +

<%= l(:text_settings_repo_is_internal).html_safe %> + <% end %> +

+ + +

+ <%= label_tag('repository_is_external', l(:label_is_external_repository)) %> + <%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %> +
<%= l(:setting_external_repository).html_safe %> +

+ +

+ <%= label_tag('repository_external_url', l(:label_repository_external_url)) %> + <%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %> +
<%= l(:setting_external_repository_url).html_safe %> +

+ +

<%= l(:text_settings_repo_need_help).html_safe %>

+ +
+ +
+<% if @repository && !@repository.new_record? %> +<%= link_to(l(:label_user_plural), + { + :controller => 'repositories', + :action => 'committers', + :id => @repository + }, :class => 'icon icon-user') %> - <%= link_to(l(:button_edit), edit_repository_path(repository), - :class => 'icon icon-edit') %> - <%= delete_link repository_path(repository) %> - <% end %> -
-<% else %> -

<%= l(:label_no_data) %>

+<% end %> + + +<%= submit_tag(l(:button_save)) %> + <% end %> -<% if User.current.allowed_to?(:manage_repository, @project) %> -

<%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %>

+<% else %> + <%= l(:text_settings_repo_creation).html_safe %> <% end %> + diff -r 0f5c32bfd33e -r 45dbcd39b9e9 plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb --- a/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Wed Jul 03 09:57:31 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Thu Jul 18 12:21:45 2013 +0100 @@ -18,6 +18,12 @@ <%= link_to(l("more_details_link"), {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%> <%= link_to l(:bibtex_link).html_safe, "javascript:void(0)", :class => "bibtex-link"-%> + + <%- unless publication.external_url.blank? -%> + <%= link_to l(:external_url_link), publication.external_url, {:target => "_blank"} -%> + <%- end -%> + +