- Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2010 Jean-Philippe Lang
+ Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %>
© 2006-2011 Jean-Philippe Lang
© 2006-2011 Jean-Philippe Lang
# HG changeset patch # User Chris Cannam # Date 1303994200 -3600 # Node ID 0964cbb517532027224ef3d4ea8e97d61003c628 # Parent c4a0942f28976bb392f907ed7280ca9967eb47d1# Parent e7ba81c8dc5a75680e05a9048d57f67ab6eeb457 Merge from branch "feature_113" diff -r e7ba81c8dc5a -r 0964cbb51753 app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb Thu Apr 28 13:29:15 2011 +0100 +++ b/app/controllers/application_controller.rb Thu Apr 28 13:36:40 2011 +0100 @@ -263,12 +263,17 @@ uri = URI.parse(back_url) # do not redirect user to another host or to the login or register page if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) + # soundsoftware: if back_url is the home page, + # change it to My Page (#125) + if (uri.path == home_path) + uri.path = uri.path + "/my" + end # soundsoftware: if login page is https but back_url http, # switch back_url to https to ensure cookie validity (#83) if (uri.scheme == "http") && (URI.parse(request.url).scheme == "https") uri.scheme = "https" - back_url = uri.to_s end + back_url = uri.to_s redirect_to(back_url) return end diff -r e7ba81c8dc5a -r 0964cbb51753 app/controllers/my_controller.rb --- a/app/controllers/my_controller.rb Thu Apr 28 13:29:15 2011 +0100 +++ b/app/controllers/my_controller.rb Thu Apr 28 13:36:40 2011 +0100 @@ -24,14 +24,16 @@ BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, 'issueswatched' => :label_watched_issues, + 'activitymyprojects' => :label_activity_my_recent, 'news' => :label_news_latest, + 'tipoftheday' => :label_tipoftheday, 'calendar' => :label_calendar, 'documents' => :label_document_plural, 'timelog' => :label_spent_time }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze - DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'], - 'right' => ['issuesreportedbyme'] + DEFAULT_LAYOUT = { 'left' => ['tipoftheday', 'activitymyprojects'], + 'right' => ['issueswatched','calendar'] }.freeze verify :xhr => true, diff -r e7ba81c8dc5a -r 0964cbb51753 app/controllers/projects_controller.rb --- a/app/controllers/projects_controller.rb Thu Apr 28 13:29:15 2011 +0100 +++ b/app/controllers/projects_controller.rb Thu Apr 28 13:36:40 2011 +0100 @@ -217,7 +217,15 @@ end end end - + + def overview + @project.has_welcome_page = params[:has_welcome_page] + if @project.save + flash[:notice] = l(:notice_successful_update) + end + redirect_to :action => 'settings', :id => @project, :tab => 'overview' + end + def modules @project.enabled_module_names = params[:enabled_modules] flash[:notice] = l(:notice_successful_update) diff -r e7ba81c8dc5a -r 0964cbb51753 app/controllers/welcome_controller.rb --- a/app/controllers/welcome_controller.rb Thu Apr 28 13:29:15 2011 +0100 +++ b/app/controllers/welcome_controller.rb Thu Apr 28 13:36:40 2011 +0100 @@ -18,11 +18,16 @@ class WelcomeController < ApplicationController caches_action :robots + include ProjectsHelper + helper :projects + def index - @news = News.latest User.current + @site_project = Project.find_by_identifier "soundsoftware-site" + @site_news = [] + @site_news = News.latest_for @site_project if @site_project @projects = Project.latest User.current - # tests if user is logged in to gfenerate the tips of the day list + # tests if user is logged in to generate the tips of the day list if User.current.logged? @tipsoftheday = Setting.tipoftheday_text else diff -r e7ba81c8dc5a -r 0964cbb51753 app/helpers/projects_helper.rb --- a/app/helpers/projects_helper.rb Thu Apr 28 13:29:15 2011 +0100 +++ b/app/helpers/projects_helper.rb Thu Apr 28 13:36:40 2011 +0100 @@ -23,6 +23,7 @@ def project_settings_tabs tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural}, + {:name => 'overview', :action => :edit_project, :partial => 'projects/settings/overview', :label => :label_welcome_page}, {:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural}, {:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural}, {:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural}, @@ -48,6 +49,16 @@ options << project_tree_options_for_select(project.allowed_parents.compact, :selected => selected) content_tag('select', options, :name => 'project[parent_id]', :id => 'project_parent_id') end + + def render_project_short_description(project) + s = '' + if (project.short_description) + s << "
<%= l(:label_activity_my_recent_none) %>
+ <% end %> + +<% else %> + + <% if !@project.nil? %> +<%= link_to_project(news.project) + ': ' unless @project %>
-<%= link_to h(news.title), news_path(news) %>
-<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
-
+
<%= l(:text_has_welcome_page_info, { :overview_link => link_to(l(:label_overview), { :controller => 'projects', :action => 'show' } ) } ) %>
+ +<% if @project.module_enabled? :wiki %> + +<%= link_to(l(:button_welcome_page_edit), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %> + +<% else %> + +
<%= l(:text_has_welcome_page_wiki_disabled, { :modules_link => link_to(l(:label_module_plural), { :controller => 'projects', :action => 'settings', :tab => 'modules' } ) } ) %>
+ +<% end %> + +
+<%= check_box_tag 'has_welcome_page', 1, @project.has_welcome_page? -%>
+
<%= l(:setting_has_welcome_page) %>
+
+
<%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %>
<% end %> + + <%= render :partial => 'activities/recent' %> + <%= call_hook(:view_projects_show_right, :project => @project) %> @@ -73,6 +102,8 @@ <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %> <% end %> +<% end %> + <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %> <% end %> diff -r e7ba81c8dc5a -r 0964cbb51753 app/views/welcome/index.rhtml --- a/app/views/welcome/index.rhtml Thu Apr 28 13:29:15 2011 +0100 +++ b/app/views/welcome/index.rhtml Thu Apr 28 13:36:40 2011 +0100 @@ -9,37 +9,33 @@You can replace the standard {{overview_link}} page for this project with your own welcome page.
This page will be editable using the project Wiki.
+ text_has_welcome_page_wiki_disabled: Note: You must enable the Wiki module in the {{modules_link}} tab before you can create or edit this page.
default_role_manager: Manager
diff -r e7ba81c8dc5a -r 0964cbb51753 config/routes.rb
--- a/config/routes.rb Thu Apr 28 13:29:15 2011 +0100
+++ b/config/routes.rb Thu Apr 28 13:36:40 2011 +0100
@@ -138,6 +138,7 @@
:copy => [:get, :post],
:settings => :get,
:modules => :post,
+ :overview => :post,
:archive => :post,
:unarchive => :post
} do |project|
diff -r e7ba81c8dc5a -r 0964cbb51753 db/migrate/20110331152140_add_has_welcome_page_to_projects.rb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/db/migrate/20110331152140_add_has_welcome_page_to_projects.rb Thu Apr 28 13:36:40 2011 +0100
@@ -0,0 +1,9 @@
+class AddHasWelcomePageToProjects < ActiveRecord::Migration
+ def self.up
+ add_column :projects, :has_welcome_page, :boolean
+ end
+
+ def self.down
+ remove_column :projects, :has_welcome_page
+ end
+end
diff -r e7ba81c8dc5a -r 0964cbb51753 extra/soundsoftware/extract-docs.sh
--- a/extra/soundsoftware/extract-docs.sh Thu Apr 28 13:29:15 2011 +0100
+++ b/extra/soundsoftware/extract-docs.sh Thu Apr 28 13:36:40 2011 +0100
@@ -12,6 +12,7 @@
redgrp="redmine"
apikey=""
+apischeme="https"
apihost=""
apiuser=""
apipass=""
@@ -36,9 +37,9 @@
p="$1"
if [ -n "$apikey" ]; then
if [ -n "$apiuser" ]; then
- sudo -u docgen curl -u "$apiuser":"$apipass" "http://$apihost/sys/projects/$p/embedded.xml?enable=1&key=$apikey" -d ""
+ sudo -u docgen curl -u "$apiuser":"$apipass" "$apischeme://$apihost/sys/projects/$p/embedded.xml?enable=1&key=$apikey" -d ""
else
- sudo -u docgen curl "http://$apihost/sys/projects/$p/embedded.xml?enable=1&key=$apikey" -d ""
+ sudo -u docgen curl "$apischeme://$apihost/sys/projects/$p/embedded.xml?enable=1&key=$apikey" -d ""
fi
else
echo "Can't enable Embedded, API not configured" 1>&2
diff -r e7ba81c8dc5a -r 0964cbb51753 lib/redmine.rb
--- a/lib/redmine.rb Thu Apr 28 13:29:15 2011 +0100
+++ b/lib/redmine.rb Thu Apr 28 13:36:40 2011 +0100
@@ -48,7 +48,7 @@
map.permission :view_project, {:projects => [:show], :activities => [:index]}, :public => true
map.permission :search_project, {:search => :index}, :public => true
map.permission :add_project, {:projects => [:new, :create]}, :require => :loggedin
- map.permission :edit_project, {:projects => [:settings, :edit, :update]}, :require => :member
+ map.permission :edit_project, {:projects => [:settings, :edit, :update, :overview]}, :require => :member
map.permission :select_project_modules, {:projects => :modules}, :require => :member
map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy, :autocomplete_for_member]}, :require => :member
map.permission :manage_versions, {:projects => :settings, :versions => [:new, :create, :edit, :update, :close_completed, :destroy]}, :require => :member
@@ -185,6 +185,7 @@
Redmine::MenuManager.map :project_menu do |menu|
menu.push :overview, { :controller => 'projects', :action => 'show' }
+ menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
menu.push :activity, { :controller => 'activities', :action => 'index' }
menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
:if => Proc.new { |p| p.shared_versions.any? }
@@ -193,7 +194,6 @@
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
- menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id,
:if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
diff -r e7ba81c8dc5a -r 0964cbb51753 public/stylesheets/application.css
--- a/public/stylesheets/application.css Thu Apr 28 13:29:15 2011 +0100
+++ b/public/stylesheets/application.css Thu Apr 28 13:36:40 2011 +0100
@@ -216,6 +216,7 @@
h3.version { background: url(../images/package.png) no-repeat 0% 50%; padding-left: 20px; }
div.issues h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; }
+div.activity h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; }
div.members h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; }
div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left: 20px; }
div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }
@@ -293,15 +294,19 @@
div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; }
div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
-div#activity dl, #search-results { margin-left: 2em; }
-div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
-div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
-div#activity dt.me .time { border-bottom: 1px solid #999; }
-div#activity dt .time { color: #777; font-size: 80%; }
+div#activity dl, div#news dl, #search-results { margin-left: 2em; }
+div#activity .box dl { margin-left: 0; }
+div#activity dd, div#news dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
+div#activity dt, div#news dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
+div#activity dt.me .time, div#news dt.me .time { border-bottom: 1px solid #999; }
+div#activity dt .time, div#news dt .time, .projects .latest .time { color: #777; font-size: 80%; }
div#activity dd .description, #search-results dd .description { font-style: italic; }
-div#activity span.project:after, #search-results span.project:after { content: " -"; }
+div#activity span.project:after, div#news span.project:after, #search-results span.project:after { content: " -"; }
div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }
+.projects .latest .title { margin-right: 0.5em; }
+.tipoftheday .tip { margin-left: 2em; margin-top: 0.5em; }
+
#search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
div#search-results-counts { display: block; padding-left: 0; margin-left: 0; }
@@ -352,6 +357,8 @@
ul.projects div.root a.project { /* font-family: "Trebuchet MS", Verdana, sans-serif; */ font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
/* .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; } */
+li.latest { margin-bottom: 0.5em; }
+
#tracker_project_ids ul { margin: 0; padding-left: 1em; }
#tracker_project_ids li { list-style-type:none; }
diff -r e7ba81c8dc5a -r 0964cbb51753 public/themes/soundsoftware/stylesheets/application.css
--- a/public/themes/soundsoftware/stylesheets/application.css Thu Apr 28 13:29:15 2011 +0100
+++ b/public/themes/soundsoftware/stylesheets/application.css Thu Apr 28 13:36:40 2011 +0100
@@ -116,13 +116,14 @@
#header { position: absolute; z-index: 0; top: 0; width: 100%; background: #fdfbf5; border-bottom: 2px solid #a9b680; /* height:80px; */ padding: 20px 0 0.5em 0; margin-bottom: 0; }
#header a { color: #be5700; }
#header h1 { color: #525a38; margin-top: 25px; font-size: 3em; font-weight: normal; margin-left: 10px; }
+#header #project-title a, #header #project-title a:hover { color: #525a38; text-decoration: none; }
.header-general h1 {
background: url('soundsoftware-logo-title-only-transparent-beta.png') no-repeat 0 0;
text-indent: -9999px;
width: 500px;
height: 34px;
}
-
+
#quick-search { margin-right: 6px; margin-top: 1em; color: #000; }
#project-jump-box { float: right; margin-right: 6px; margin-top: 5px; color: #000; }
#project-ancestors-title {
diff -r e7ba81c8dc5a -r 0964cbb51753 vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.rhtml
--- a/vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.rhtml Thu Apr 28 13:29:15 2011 +0100
+++ b/vendor/plugins/redmine_checkout/app/views/redmine_checkout_hooks/_view_repositories_show_contextual.rhtml Thu Apr 28 13:36:40 2011 +0100
@@ -20,7 +20,11 @@
<% if User.current.logged? %>
+ <% if repository.is_external? %>
+ <%=l :label_access_type_all, :type => l(:label_access_read_only) %>
+ <% else %>
<% if default_protocol %><%=l :label_access_type, :type => l(default_protocol.access_label(User.current)) %><% end %>
+ <% end %>
<% else %>
<% end %>
diff -r e7ba81c8dc5a -r 0964cbb51753 vendor/plugins/redmine_checkout/config/locales/en.yml
--- a/vendor/plugins/redmine_checkout/config/locales/en.yml Thu Apr 28 13:29:15 2011 +0100
+++ b/vendor/plugins/redmine_checkout/config/locales/en.yml Thu Apr 28 13:36:40 2011 +0100
@@ -17,6 +17,7 @@
button_add_protocol: "Add Protocol"
label_access_type: 'You have {{type}} access to this URL.'
+ label_access_type_all: 'All access to this URL is {{type}}.'
label_access_read_only: 'Read Only'
label_access_read_write: "Read and Write"
label_access_permission: "Depending on user's permissions"
@@ -38,5 +39,5 @@
help_moved_settings: "The settings page has been moved to {{link}}."
label_settings_location: "Administration -> Settings -> Checkout"
- text_repository_external: "The primary repository for this project is hosted at {{location}}
.
This repository is a read-only copy which is updated automatically."
+ text_repository_external: "The primary repository for this project is hosted at {{location}}
.
This repository is a read-only copy which is updated automatically every hour."