# HG changeset patch # User Chris Cannam # Date 1314183190 -3600 # Node ID c4ddb9531f4c1e0dfbf8f31a232f1e61ce4c5eba # Parent 712324fee0c00ee2aea8f6e6556415c7c2075a05 Some rearrangements and stylings diff -r 712324fee0c0 -r c4ddb9531f4c public/themes/soundsoftware/stylesheets/application.css --- a/public/themes/soundsoftware/stylesheets/application.css Tue Aug 23 15:47:15 2011 +0100 +++ b/public/themes/soundsoftware/stylesheets/application.css Wed Aug 24 11:53:10 2011 +0100 @@ -102,6 +102,14 @@ table.files .file .active { font-weight: bold; } table.files .file .description { font-weight: normal; color: #3e442c; } +.tabular .identify_author label { + font-weight: normal; + float: inherit; + text-align: inherit; + margin-left: 0; + width: computed; +} + #top-menu { position: absolute; top: 0; z-index: 1; left: 0px; width: 100%; font-size: 90%; /* height: 2em; */ margin: 0; padding: 0; padding-top: 0.5em; background-color: #3e442c; } #top-menu ul { margin-left: 10px; } #top-menu a { font-weight: bold; } diff -r 712324fee0c0 -r c4ddb9531f4c vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb --- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 24 11:53:10 2011 +0100 @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- require 'bibtex' module PublicationsHelper @@ -69,7 +70,7 @@ publication.projects.each do |proj| if @project == proj - confirm_msg = "Are you sure you want to remove the current project from this publication's projects list?" + confirm_msg = 'Are you sure you want to remove the current project from this publication\'s projects list?' else confirm_msg = false end @@ -82,17 +83,17 @@ def show_bibtex_fields(bibtex_entry) s = "" - - bibtex_entry.attributes.each do |field| - if field[1] != nil - s << "

" + l("field_#{field[0]}") + "

" - - if field[0] == "entry_type" - s << bibtex_entry.entry_type_label - else - s << bibtex_entry.attributes[field[0]].to_s - end + bibtex_entry.attributes.keys.sort.each do |key| + value = bibtex_entry.attributes[key].to_s + next if key == 'id' or key == 'publication_id' or value == "" + s << "

" + l("field_#{key}") + "

" + s << "

" + if key == "entry_type" + s << bibtex_entry.entry_type_label + else + s << value end + s << "

" end s end diff -r 712324fee0c0 -r c4ddb9531f4c vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml --- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Wed Aug 24 11:53:10 2011 +0100 @@ -11,16 +11,18 @@

<%# link_to_function l(:label_author_is_me), "update_author_info(this," + User.current.get_author_info.to_json + ")", :id => "add_me_as_author" %> +

+ <%= f.select :search_results, options_for_select(@author_options), {}, {:size => 5, + :onChange => remote_function( :url => { :controller => :publications, :action => :get_user_info, :object_id => form_object_id(f.object_name) }, :with => "'value=' + + value" )} %> +

+
Is it this author?
-

+

<%= f.radio_button :identify_author, "yes", :onClick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });" %><%= f.label :identify_author_yes %>
<%= f.radio_button :identify_author, "correct", :onClick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });" %><%= f.label :identify_author_correct %>
<%= f.radio_button :identify_author, "no", :onClick => "identify_author_status($(this).value, #{form_object_id(f.object_name) });", :checked => "checked" %><%= f.label :identify_author_no %>

- - <%= f.select :search_results, options_for_select(@author_options), {}, {:size => 5, - :onChange => remote_function( :url => { :controller => :publications, :action => :get_user_info, :object_id => form_object_id(f.object_name) }, :with => "'value=' + - value" )} %>
diff -r 712324fee0c0 -r c4ddb9531f4c vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Wed Aug 24 11:53:10 2011 +0100 @@ -1,21 +1,9 @@ <%= f.error_messages %> -

<%= f.text_field :title, :required => true, :size => 60 %>

+

<%= f.text_field :title, :required => true, :size => 70 %>

-
-

<%= l(:authors) %>

-
- <% f.fields_for :authorships do |builder| -%> - <%= render "authorship_fields", :f => builder %> - <%- end -%> - - <%= link_to_add_fields l(:label_add_another_author), f, :authorships %> -
-
- -
-

Other Details

- +
+

<%= l(:label_publication_other_details) %>

<% f.fields_for :bibtex_entry do |builder| -%> <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> @@ -23,4 +11,14 @@
+
+

<%= l(:authors) %>

+
+ <% f.fields_for :authorships do |builder| -%> + <%= render "authorship_fields", :f => builder %> + <%- end -%> + <%= link_to_add_fields l(:label_add_an_author), f, :authorships %> +
+
+ diff -r 712324fee0c0 -r c4ddb9531f4c vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb Wed Aug 24 11:53:10 2011 +0100 @@ -2,9 +2,10 @@

<%=l(:label_publication_show)%>

-
-

Title

+
+

<%= h @publication.title %> +

<%= l(:authors) %>

    @@ -17,28 +18,24 @@
<%= sortable_element("authorships", :url => { :controller => :publications, :action => :sort_author_order }, :handle => "handle") %> -
- <%- if @publication.bibtex_entry != nil -%> <%= show_bibtex_fields(@publication.bibtex_entry) %> <%- end -%> -

+
<%= link_to l(:label_publication_edit), { :controller => "publications", :action => "edit", :id => @publication, :project_id => @project } %> | <%= link_to "Delete", {:controller => 'publications', :action => 'destroy', :id => @publication, :project_id => @project }, :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> | <%= link_to "View All", publications_path %> -

<% projects = Project.active.find(:all, :limit => 100, :order => 'name ASC') - @publication.projects %> -
- -

<%=l(:label_publication_project_index)%>

+<% content_for :sidebar do %> +

<%=l(:label_publication_project_index)%>

<%= render :partial => 'list_projects' %>

<%= render :partial => 'add_project_form' %> -
+<% end %> diff -r 712324fee0c0 -r c4ddb9531f4c vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Aug 24 11:53:10 2011 +0100 @@ -34,8 +34,8 @@ label_add_me_as_author: "Add me as an author" label_add_an_author: "Add an author" label_add_another_author: "Add another author" - field_search_name: "Search author" - field_search_results: "Authors" + field_search_name: "Search by name" + field_search_results: "" label_save_author: "Save Author" label_author_information: "Author Information" @@ -51,6 +51,7 @@ label_project_search: "Find project by name: " label_publication_project_index: "Projects associated with this publication" label_publication_index: "View all publications" + label_publication_other_details: "Details" text_author_email: "Author's email address as on the paper." text_author_institution: "Author's institution name as on paper."