Mercurial > hg > soundsoftware-site
changeset 1361:7c0909052511
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 18 Jul 2013 12:21:57 +0100 |
parents | 25603efa57b5 (current diff) 45dbcd39b9e9 (diff) |
children | 8633c9040b3b f019ad7fcf1b |
files | |
diffstat | 16 files changed, 130 insertions(+), 73 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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?
--- 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',
--- 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 @@ <ul> <% - for project in busy_projects(events, 5) + for project in busy_projects(events, 7) %> <li class="busy">
--- a/app/views/issues/_form.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/issues/_form.html.erb Thu Jul 18 12:21:57 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) -%> -<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> -<% @issue.project.users.sort.each do |user| -%> -<label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, !!(@issue.watched_by?(user) or user == User.current) %> <%=h user %></label> -<% end -%> -</p> -<% end %> - -<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> - -<%= wikitoolbar_for 'issue_description' %>
--- 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 @@ <h2><%= l(:label_explore_projects) %></h2> <div class="threecolumnleft"> -<% cache(:action => 'explore', :action_suffix => 'tags', :expires_in => 1.hour) do %> +<% cache(:action => 'explore', :action_suffix => 'tags') do %> <div class="tags box"> <h3><%=l(:label_project_tags_all)%></h3> <%= render :partial => 'projects/tagcloud' %> @@ -28,7 +28,7 @@ </div> <div class="threecolumnleft"> - <% cache(:action => 'explore', :action_suffix => 'busy_institutions', :expires_in => 1.hour) do %> + <% cache(:action => 'explore', :action_suffix => 'busy_institutions') do %> <div class="institutions box"> <h3><%=l(:label_institutions_busy)%></h3> <%= render :partial => 'activities/busy_institution' %> @@ -38,7 +38,7 @@ </div> <div class="threecolumnmid"> - <% cache(:action => 'explore', :action_suffix => 'busy_projects', :expires_in => 1.hour) do %> + <% cache(:action => 'explore', :action_suffix => 'busy_projects') do %> <div class="projects box"> <h3><%=l(:label_projects_busy)%></h3> <%= render :partial => 'activities/busy' %>
--- a/app/views/projects/settings/_repositories.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/app/views/projects/settings/_repositories.html.erb Thu Jul 18 12:21:57 2013 +0100 @@ -1,41 +1,61 @@ -<% if @project.repositories.any? %> -<table class="list"> - <thead> - <tr> - <th><%= l(:field_identifier) %></th> - <th><%= l(:field_repository_is_default) %></th> - <th><%= l(:label_scm) %></th> - <th><%= l(:label_repository) %></th> - <th></th> - </tr> - </thead> - <tbody> - <% @project.repositories.sort.each do |repository| %> - <tr class="<%= cycle 'odd', 'even' %>"> - <td> - <%= link_to repository.identifier, - {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %> - </td> - <td align="center"><%= checked_image repository.is_default? %></td> - <td><%=h repository.scm_name %></td> - <td><%=h repository.url %></td> - <td class="buttons"> - <% 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' %> + +<div class="box tabular"> + +<p> + <%= l(:text_settings_repo_explanation).html_safe %></ br> + <% if @repository.is_external %> + <p><%= l(:text_settings_repo_is_external).html_safe %></ br> + <% else %> + <p><%= l(:text_settings_repo_is_internal).html_safe %></ br> + <% end %> +</p> + + +<p> + <%= label_tag('repository_is_external', l(:label_is_external_repository)) %> + <%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %> + <br/><em><%= l(:setting_external_repository).html_safe %></em> +</p> + +<p> + <%= label_tag('repository_external_url', l(:label_repository_external_url)) %> + <%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %> + <br/><em><%= l(:setting_external_repository_url).html_safe %></em> +</p> + +<p><%= l(:text_settings_repo_need_help).html_safe %></p> + +</div> + +<div class="contextual"> +<% 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 %> - </td> - </tr> - <% end %> - </tbody> -</table> -<% else %> -<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> +</div> + +<%= submit_tag(l(:button_save)) %> + <% end %> -<% if User.current.allowed_to?(:manage_repository, @project) %> - <p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p> +<% else %> + <%= l(:text_settings_repo_creation).html_safe %></ br> <% end %> +
--- 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 @@ <div class="box tabular"> <h3><%=l(:label_ssamr_details)%></h3> - <%= labelled_fields_for :ssamr_user_details do |ssamr_user_detail| %> + <%= labelled_fields_for :ssamr_user_detail, @user.ssamr_user_detail do |ssamr_user_detail| %> <p> - <%= 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' %> </p> <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
--- 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 @@ </div> <% end %> +<div id="welcomepagenews"> + <% if @site_news.any? %> + <div class="news box"> + <h3><%=l(:label_news_site_latest)%></h3> + <%= render :partial => 'news/news', :locals => { :project => @site_project }, :collection => @site_news %> + <%= link_to l(:label_news_more), { :controller => 'news', :project_id => @site_project.identifier, :action => 'index' } %> + </div> + <% end %> +</div> + <div id="welcomepage"> - <%= textilizable Setting.welcome_text %> - </div> <% content_for :header_tags do %>
--- a/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Thu Jun 20 13:14:14 2013 +0100 +++ b/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb Thu Jul 18 12:21:57 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 -%> + + </dd> <dd class="bibtex-textarea collapsed" style="display: none;"> <textarea readonly> <%= print_bibtex_format(publication) -%> </textarea>
--- a/plugins/redmine_bibliography/config/locales/en.yml Thu Jun 20 13:14:14 2013 +0100 +++ b/plugins/redmine_bibliography/config/locales/en.yml Thu Jul 18 12:21:57 2013 +0100 @@ -150,4 +150,5 @@ bibtex_link: "[B<small>IB</small>T<sub>E</sub>X]" more_details_link: "[More Details]" + external_url_link: "[URL (ext.)]"
--- a/plugins/redmine_tags/assets/stylesheets/redmine_tags.css Thu Jun 20 13:14:14 2013 +0100 +++ b/plugins/redmine_tags/assets/stylesheets/redmine_tags.css Thu Jul 18 12:21:57 2013 +0100 @@ -22,6 +22,7 @@ ul.tags li { margin: .25em 0px; } div.tags { text-align: center; } +div.tags h3 { text-align: left; } div.tags .tag-label { margin: .25em; } div.tags .tag-nube-1 { font-size: .8em; } div.tags .tag-nube-2 { font-size: .9em; }
--- a/plugins/redmine_tags/lib/redmine_tags/hooks/views_issues_hook.rb Thu Jun 20 13:14:14 2013 +0100 +++ b/plugins/redmine_tags/lib/redmine_tags/hooks/views_issues_hook.rb Thu Jul 18 12:21:57 2013 +0100 @@ -19,10 +19,18 @@ module RedmineTags module Hooks class ViewsIssuesHook < Redmine::Hook::ViewListener - render_on :view_issues_show_details_bottom, :partial => 'issues/tags' - render_on :view_issues_form_details_bottom, :partial => 'issues/tags_form' - render_on :view_issues_sidebar_planning_bottom, :partial => 'issues/tags_sidebar' - render_on :view_issues_bulk_edit_details_bottom, :partial => 'issues/tags_form' + + # TODO: temporary hack to disable tags on issues + ## BEGIN ~lf 20130712 + + # render_on :view_issues_show_details_bottom, :partial => '# issues/tags' + # render_on :view_issues_form_details_bottom, :partial => '# issues/tags_form' + # render_on :view_issues_sidebar_planning_bottom, :partial => '# issues/tags_sidebar' + # render_on :view_issues_bulk_edit_details_bottom, :partial => 'issues/tags_form' + + ## END ~lf 20130712 + + end end end
--- a/public/javascripts/repository.js Thu Jun 20 13:14:14 2013 +0100 +++ b/public/javascripts/repository.js Thu Jul 18 12:21:57 2013 +0100 @@ -1,7 +1,8 @@ -function toggle_ext_url(){ - if($('repository_is_external').checked) - $('repository_external_url').enable(); - else - $('repository_external_url').disable(); +function toggle_ext_url() { + if (document.getElementById('repository_is_external').checked) { + document.getElementById('repository_external_url').disabled = false; + } else { + document.getElementById('repository_external_url').disabled = true; + } }
--- a/public/stylesheets/application.css Thu Jun 20 13:14:14 2013 +0100 +++ b/public/stylesheets/application.css Thu Jul 18 12:21:57 2013 +0100 @@ -5,7 +5,12 @@ #content h1, h2, h3, h4 {color: #555;} h2, .wiki h1 {font-size: 20px;} h3, .wiki h2 {font-size: 16px;} -h4, .wiki h3 {font-size: 13px;} +h4, .wiki h4, .wiki h5, .wiki h6 {font-size: 14px;} +.wiki h3 {font-size: 15px;} +.wiki h5 {font-weight: normal; font-style: italic; } +.wiki h6 {font-weight: normal; font-style: normal; } + + h4 {border-bottom: 1px dotted #bbb;} /***** Layout *****/
--- a/public/themes/soundsoftware/stylesheets/application.css Thu Jun 20 13:14:14 2013 +0100 +++ b/public/themes/soundsoftware/stylesheets/application.css Thu Jul 18 12:21:57 2013 +0100 @@ -178,7 +178,7 @@ #welcomepage { width: 80%; - margin-left: 10%; + margin-left: 71px; margin-top: 10px; } #welcomepage blockquote { @@ -187,15 +187,30 @@ padding-left: 0; margin-left: 0; } +#welcomepage h2 { + font-size: 2em; + margin-bottom: 0.8em; +} #welcomepage p, #welcomepage li { - font-size: 1.2em; + font-size: 1.25em; color: #3e442c; } #welcomepage p { margin-left: 2em; - margin-top: 0.7em; + margin-top: 1em; margin-bottom: 0.7em; } +#welcomepage a { + white-space: nowrap; +} +#welcomepagenews { + float: right; + width: 27%; + margin-right: 3%; + margin-top: 1em; + margin-left: 2em; + margin-bottom: 2em; +} div.flash.newsalert { float: right;