# HG changeset patch # User Chris Cannam # Date 1374146517 -3600 # Node ID 7c0909052511a3d3f1932f4c85ffd109f190ed24 # Parent 25603efa57b54184a7a8aec370df0d98adaf3acb# Parent 45dbcd39b9e9f1b6520b970db4eb0e37e188a15d Merge from live branch diff -r 25603efa57b5 -r 7c0909052511 app/controllers/projects_controller.rb --- a/app/controllers/projects_controller.rb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/controllers/projects_controller.rb Thu Jul 18 12:21:57 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 25603efa57b5 -r 7c0909052511 app/controllers/welcome_controller.rb --- a/app/controllers/welcome_controller.rb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/controllers/welcome_controller.rb Thu Jul 18 12:21:57 2013 +0100 @@ -24,7 +24,7 @@ def index @site_project = Project.find_by_identifier "soundsoftware-site" @site_news = [] - @site_news = News.latest_for @site_project if @site_project + @site_news = News.latest_for(@site_project, 3) if @site_project # tests if user is logged in to generate the tips of the day list if User.current.logged? diff -r 25603efa57b5 -r 7c0909052511 app/models/repository.rb --- a/app/models/repository.rb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/models/repository.rb Thu Jul 18 12:21:57 2013 +0100 @@ -51,6 +51,8 @@ 'password', 'path_encoding', 'log_encoding', + 'is_external', + 'external_url', 'is_default' safe_attributes 'url', diff -r 25603efa57b5 -r 7c0909052511 app/views/activities/_busy.html.erb --- a/app/views/activities/_busy.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/activities/_busy.html.erb Thu Jul 18 12:21:57 2013 +0100 @@ -13,7 +13,7 @@
-<% @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 25603efa57b5 -r 7c0909052511 app/views/projects/explore.html.erb --- a/app/views/projects/explore.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/projects/explore.html.erb Thu Jul 18 12:21:57 2013 +0100 @@ -11,7 +11,7 @@<%= 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 %> br> + <% if @repository.is_external %> + <%= l(:text_settings_repo_is_external).html_safe %> br> + <% else %> + <%= l(:text_settings_repo_is_internal).html_safe %> br> + <% end %> + + + +
+ <%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
+ <%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %>
+
+ <%= label_tag('repository_external_url', l(:label_repository_external_url)) %>
+ <%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %>
+ <%= 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 %>
- |
-
<%= l(:label_no_data) %>
+<% end %> +<%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %>
+<% else %> + <%= l(:text_settings_repo_creation).html_safe %> br> <% end %> + diff -r 25603efa57b5 -r 7c0909052511 app/views/users/_form.html.erb --- a/app/views/users/_form.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/users/_form.html.erb Thu Jul 18 12:21:57 2013 +0100 @@ -1,5 +1,6 @@ -<%= javascript_include_tag "ssamr_institutions" %> - +<% content_for :header_tags do %> + <%= javascript_include_tag "ssamr_institutions" %> +<% end %> <%= error_messages_for 'user' %> @@ -27,9 +28,9 @@- <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %> + <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %>
diff -r 25603efa57b5 -r 7c0909052511 app/views/welcome/index.html.erb --- a/app/views/welcome/index.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/welcome/index.html.erb Thu Jul 18 12:21:57 2013 +0100 @@ -5,10 +5,18 @@