# HG changeset patch # User luisf # Date 1307552389 -3600 # Node ID d643b4186e4c42f062c6266b8b99220cb30a596a # Parent 0a5d997578daf6210390abdb83a3d17d4754d3de The new/edit views are now using more partials; solved some minor bugs; added remove button to authors form. diff -r 0a5d997578da -r d643b4186e4c vendor/plugins/redmine_bibliography/app/views/publications/_authors_fields.html.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authors_fields.html.erb Wed Jun 08 17:59:49 2011 +0100 @@ -0,0 +1,7 @@ +

+ <%= f.label :name, l("name") %> <%= f.text_field :name %> +

+<%= f.check_box :_destroy %> +<%= f.label :_destroy, l("remove") %> + + diff -r 0a5d997578da -r d643b4186e4c vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb Wed Jun 08 17:59:49 2011 +0100 @@ -0,0 +1,18 @@ +

+ <%= f.label :year, l(:year) %> <%= f.text_field :year %> +

+

+ <%= f.label :chapter, l(:chapter) %> <%= f.text_field :chapter %> +

+

+ <%= f.label :editor, l(:editor) %> <%= f.text_field :editor %> +

+

+ <%= f.label :booktitle, l(:booktitle) %> <%= f.text_field :booktitle %> +

+

+ <%= f.label :publisher, l(:publisher) %> <%= f.text_field :publisher %> +

+

+ <%= f.label :pages, l(:pages) %> <%= f.text_field :pages %> +

diff -r 0a5d997578da -r d643b4186e4c vendor/plugins/redmine_bibliography/app/views/publications/_edit.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/publications/_edit.html.erb Wed Jun 08 14:36:10 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/publications/_edit.html.erb Wed Jun 08 17:59:49 2011 +0100 @@ -1,40 +1,18 @@ <% form_for @publication do |f| -%> <%= f.error_messages %> -

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

-

<%= l(:authors) %>

- - <%- f.fields_for :authors do |author| -%> -

- <%= author.label :name, l("name") %> <%= author.text_field :name %> -

+

<%= f.label :title, l(:title) %> <%= f.text_field :title %>

+ +

<%= l(:authors) %>

+ <%- f.fields_for :authors do |builder| -%> + <%= render :partial => 'authors_fields', :locals => { :f => builder} %> <%- end -%> - - +

Other Details

- - <% f.fields_for :bibtex_entry do |bib| -%> -

- <%= bib.label :year, l(:year) %> <%= bib.text_field :year %> -

-

- <%= bib.label :chapter, l(:chapter) %> <%= bib.text_field :chapter %> -

-

- <%= bib.label :editor, l(:editor) %> <%= bib.text_field :editor %> -

-

- <%= bib.label :booktitle, l(:booktitle) %> <%= bib.text_field :booktitle %> -

-

- <%= bib.label :publisher, l(:publisher) %> <%= bib.text_field :publisher %> -

-

- <%= bib.label :pages, l(:pages) %> <%= bib.text_field :pages %> -

- <% end -%> + + <% f.fields_for :bibtex_entry do |builder| -%> + <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> + <%- end -%> <%= f.submit %> diff -r 0a5d997578da -r d643b4186e4c vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Jun 08 14:36:10 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Wed Jun 08 17:59:49 2011 +0100 @@ -4,6 +4,8 @@ authors: "Authors" author: "Author" name: "Name" + + remove: "Remove" # bibtex_entries strings id: "id"