Mercurial > hg > soundsoftware-site
changeset 647:525f48af3f54 feature_36
Shorten email address in search results, showing domain only (text too long otherwise)
Apply min-width to search results box
Remove initialisation of search results in edit action (fixing #287)
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 09 Sep 2011 12:24:45 +0100 |
parents | e01aa4ccc0a2 |
children | 0c872fe77797 0c5674b65db0 |
files | vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css |
diffstat | 3 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Fri Sep 09 11:49:46 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb Fri Sep 09 12:24:45 2011 +0100 @@ -17,7 +17,7 @@ # and at least one author # @publication.authorships.build.build_author - @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] + @author_options = [["#{User.current.name} (@#{User.current.mail.partition('@')[2]})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] end @@ -79,8 +79,7 @@ @publication = Publication.find(params[:id]) @selected_bibtex_entry_type_id = @publication.bibtex_entry.entry_type - # todo: should be removed? - @author_options = [["#{User.current.name} (#{User.current.mail})", "#{User.current.class.to_s}_#{User.current.id.to_s}"]] + @author_options = [] end def update
--- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Fri Sep 09 11:49:46 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Fri Sep 09 12:24:45 2011 +0100 @@ -23,7 +23,11 @@ @author_options = [] @results.each do |result| - @author_options << ["#{result.name} (#{result.mail})", "#{result.class.to_s}_#{result.id.to_s}"] + email_bit = result.mail.partition('@')[2] + if email_bit != "": + email_bit = "(@#{email_bit})" + end + @author_options << ["#{result.name} #{email_bit}", "#{result.class.to_s}_#{result.id.to_s}"] end if @results.size > 0
--- a/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Fri Sep 09 11:49:46 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css Fri Sep 09 12:24:45 2011 +0100 @@ -28,6 +28,10 @@ margin-right: 18px; } +.edit_publication select { + min-width: 150px; +} + div#bibliography dl { margin-left: 2em; } div#bibliography .box dl { margin-left: 0; } div#bibliography dt { margin-bottom: 0px; padding-left: 20px }