# HG changeset patch # User luisf # Date 1312983605 -3600 # Node ID 724c97fc03dc0e09b4db4c4bfea8eecf7d593ec1 # Parent f463be9d101ac86db915189eb95f172491ca159a# Parent aed210f6095bc718c25cf18ceeb4ab18e1420434 Merge from 573:aed210f6095b. Fixing small issue when adding new authors. diff -r f463be9d101a -r 724c97fc03dc public/stylesheets/application.css --- a/public/stylesheets/application.css Wed Aug 10 14:30:40 2011 +0100 +++ b/public/stylesheets/application.css Wed Aug 10 14:40:05 2011 +0100 @@ -251,6 +251,11 @@ border: 1px solid #e4e4e4; } +.box h4 { +margin-top: 0; +padding-top: 0; +} + div.square { border: 1px solid #999; float: left; @@ -419,6 +424,15 @@ margin*/ } +.tabular .splitcontentleft .box p, .tabular .splitcontentright .box p, .splitcontentleft .tabular p, .splitcontentright .tabular p { +padding-left: 120px; +} + +.tabular .splitcontentleft .box label, .tabular .splitcontentright .box label, .splitcontentleft .tabular label, .splitcontentright .tabular label { +margin-left: -120px; +width: 115px; +} + .tabular label.floating{ font-weight: normal; margin-left: 0px; diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb --- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 14:40:05 2011 +0100 @@ -51,7 +51,7 @@ end def link_to_remove_fields(name, f) - f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)") + f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)", :class => 'icon icon-del') end def link_to_add_fields(name, f, association) diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml --- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Wed Aug 10 14:40:05 2011 +0100 @@ -1,29 +1,33 @@
+ +

<%= l("label_author_1") %>

+

- <%= f.text_field :name_on_paper %>
+ <%= f.text_field :name_on_paper, :size => 25 %> + <%= link_to_function l(:label_author_is_me), "update_author_info(this," + User.current.get_author_info.to_json + ")", :id => "add_me_as_author" %>
<%= h l("text_author_name_on_paper") %>
- - <%= link_to_function "Add Me as Author", "update_author_info(this," + User.current.get_author_info.to_json + ")", :class => 'icon icon-add', :id => "add_me_as_author" %> <%= observe_field( form_tag_id(f.object_name, :name_on_paper), :frequency => 0.5, :update => form_tag_id(f.object_name, :identify_author), :url => { :controller => 'publications', :action => 'autocomplete_for_author' }, :with => 'q') %> - +

<% if params[:q] && params[:q].length > 1 %> <%= select_author_links 'author[author_ids][]', @authors %> <% end %>
- <%= f.text_field :institution, :size => 60 %>
+

+ <%= f.text_field :institution, :size => 35 %>
<%= h l("text_author_institution") %>
- <%= f.text_field :email, :size => 60 %>
+ <%= f.text_field :email, :size => 35 %>
<%= h l("text_author_email") %>
<%= f.hidden_field :is_user %> - <%= f.text_field :author_user_id %> + <%= f.text_field :author_user_id, :size => 35 %>
<%= link_to_remove_fields l("remove_author"), f %> +

-
\ No newline at end of file + diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb Wed Aug 10 14:40:05 2011 +0100 @@ -1,26 +1,21 @@ -
-

<%= f.collection_select(:entry_type, BibtexEntryType.find(:all), :id, :name, {:selected => @selected_bibtex_entry_type_id, :prompt => true}) %>

- <%= f.text_field :year, :size => 60 %> + <%= f.text_field :year, :size => 4 %> +

+ <%= f.text_field :chapter, :size => 15 %>

- <%= f.text_field :chapter, :size => 60 %> + <%= f.text_field :editor, :size => 33 %>

- <%= f.text_field :editor, :size => 60 %> + <%= f.text_field :booktitle,:size => 33 %>

- <%= f.text_field :booktitle,:size => 60 %> + <%= f.text_field :publisher,:size => 33 %>

- <%= f.text_field :publisher,:size => 60 %> -

-

- <%= f.text_field :pages, :size => 60 %> + <%= f.text_field :pages, :size => 12 %>

- -
\ No newline at end of file diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb Wed Aug 10 14:40:05 2011 +0100 @@ -1,30 +1,29 @@ +<%= f.error_messages %> +

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

- <%= f.error_messages %> -

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

<%= 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 %>

+ <% 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

+
<% f.fields_for :bibtex_entry do |builder| -%> <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> <%- end -%>
+
-<% content_for :sidebar do %> - placeholder - -<% end %> - - diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb Wed Aug 10 14:40:05 2011 +0100 @@ -6,7 +6,7 @@ <% form_for @publication, :url => { :project_id => @project_id, :action => :update }, :builder => TabularFormBuilder do |f| -%> <%= render :partial => 'form', :locals => { :f => f } %> - +
<%= f.submit %> <% end %>

diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/assets/javascripts/authors.js --- a/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/assets/javascripts/authors.js Wed Aug 10 14:40:05 2011 +0100 @@ -6,7 +6,7 @@ function add_fields(link, association, content) { var new_id = new Date().getTime(); var regexp = new RegExp("new_" + association, "g") - $(link).up().insert({ + $(link).insert({ before: content.replace(regexp, new_id) }); } diff -r f463be9d101a -r 724c97fc03dc vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Aug 10 14:30:40 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Aug 10 14:40:05 2011 +0100 @@ -11,12 +11,14 @@ field_publication_authors: Authors field_publication_projects: "Associated Projects" field_author_name: Author + field_author_user: User Name field_author_username: "Associated User" field_author_publications: "Publications by this Author" bibtex_entry: entry_type: "Bibtex Entry Type" + label_author_is_me: "(I am this author)" label_add_me_as_author: "Add me as an author" label_add_another_author: "Add another author" @@ -43,10 +45,9 @@ field_email: "Email Address" # bibtex_entries model - field_entry_type: "Entry Type" + field_entry_type: "Publication Type" field_id: "id" field_publication_id: "Publication_id" - field_entry_type: "Entry Type" field_address: "Address" field_annote: "Annote" field_booktitle: "Book Title" @@ -71,7 +72,27 @@ field_volume: "Volume" field_year: "Year" + label_author_1: First author + label_author_2: Second author + label_author_3: Third author + label_author_4: Fourth author + label_author_5: Fifth author + label_author_6: Sixth author + label_author_7: Seventh author + label_author_8: Eighth author + label_author_9: Ninth author + label_author_10: Tenth author + label_author_11: Eleventh author + label_author_12: Twelfth author + label_author_13: Thirteenth author + label_author_14: Fourteenth author + label_author_15: Fifteenth author + label_author_16: Sixteenth author + label_author_17: Seventeenth author + label_author_18: Eighteenth author + label_author_19: Nineteenth author + label_author_20: Twentieth author + -