# HG changeset patch # User luisf # Date 1311603601 -3600 # Node ID 4fc8e79dc0eead4023f0e099bf1f531f40fa0bac # Parent af95d9a7507a05006621b57522b7c9701caec69a Autocomplete on the Author's name input box diff -r af95d9a7507a -r 4fc8e79dc0ee vendor/plugins/redmine_bibliography/app/models/authorship.rb --- a/vendor/plugins/redmine_bibliography/app/models/authorship.rb Mon Jul 25 14:57:48 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/models/authorship.rb Mon Jul 25 15:20:01 2011 +0100 @@ -5,14 +5,6 @@ accepts_nested_attributes_for :author accepts_nested_attributes_for :publication - - # setter and getter for virtual attribute :author search - def author_search - end - - def author_search=(string) - end - # setter and getter for virtual attribute :user_id def user_id end diff -r af95d9a7507a -r 4fc8e79dc0ee vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml --- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Mon Jul 25 14:57:48 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml Mon Jul 25 15:20:01 2011 +0100 @@ -4,16 +4,9 @@ <%= f.text_field :name_on_paper %>
<%= h l("text_author_name_on_paper") %>
- <%= "Identify Authors in the system…" %> - <%= 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" %> -

- <%= f.label :author_search, l(:label_project_search) %> - <%= f.text_field :author_search %> -

- - <%= observe_field( form_tag_id(f.object_name, :author_search), :frequency => 0.5, :update => form_tag_id(f.object_name, :identify_author), :url => { :controller => 'publications', :action => 'autocomplete_for_author' }, :with => 'q') + <%= 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') %>
diff -r af95d9a7507a -r 4fc8e79dc0ee vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Mon Jul 25 14:57:48 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Mon Jul 25 15:20:01 2011 +0100 @@ -17,7 +17,7 @@ text_author_email: "Author's email address as on the paper." text_author_institution: "Author's institution name as on paper." - text_author_name_on_paper: "Name of the author as it appears on paper." + text_author_name_on_paper: "Name of the author as it appears on paper. (In case it applies, please use the autocomplete suggestions.)" # authorships model institution: "Institution"