changeset 529:4fc8e79dc0ee feature_36

Autocomplete on the Author's name input box
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 15:20:01 +0100
parents af95d9a7507a
children ce1614b19759
files vendor/plugins/redmine_bibliography/app/models/authorship.rb vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml vendor/plugins/redmine_bibliography/config/locales/en.yml
diffstat 3 files changed, 2 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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 
--- 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 %><br />
     <em><%= h l("text_author_name_on_paper") %></em><br />
                                                 
-    <legend><%= "Identify Authors in the system…" %></legend>
-
     <%= 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" %>
 
-    <p>
-      <%= f.label :author_search, l(:label_project_search) %>
-      <%= f.text_field :author_search %>
-    </p>
-
-    <%= 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')
     %>
     
     <div id="<%= form_tag_id(f.object_name, :identify_author) %>">
--- 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"