Mercurial > hg > soundsoftware-site
changeset 449:d643b4186e4c feature_36
The new/edit views are now using more partials; solved some minor bugs; added remove button to authors form.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 08 Jun 2011 17:59:49 +0100 |
parents | 0a5d997578da |
children | 34a6cf259682 |
files | vendor/plugins/redmine_bibliography/app/views/publications/_authors_fields.html.erb vendor/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb vendor/plugins/redmine_bibliography/app/views/publications/_edit.html.erb vendor/plugins/redmine_bibliography/config/locales/en.yml |
diffstat | 4 files changed, 37 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- /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 @@ +<p> + <%= f.label :name, l("name") %> <%= f.text_field :name %> +</p> +<%= f.check_box :_destroy %> +<%= f.label :_destroy, l("remove") %> + +
--- /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 @@ + <p> + <%= f.label :year, l(:year) %> <%= f.text_field :year %> + </p> + <p> + <%= f.label :chapter, l(:chapter) %> <%= f.text_field :chapter %> + </p> + <p> + <%= f.label :editor, l(:editor) %> <%= f.text_field :editor %> + </p> + <p> + <%= f.label :booktitle, l(:booktitle) %> <%= f.text_field :booktitle %> + </p> + <p> + <%= f.label :publisher, l(:publisher) %> <%= f.text_field :publisher %> + </p> + <p> + <%= f.label :pages, l(:pages) %> <%= f.text_field :pages %> + </p>
--- 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 %> - <p> - <%= f.label :title, l(:title) %> <%= f.text_field :title %> - </p> - <h3><%= l(:authors) %></h3> - - <%- f.fields_for :authors do |author| -%> - <p> - <%= author.label :name, l("name") %> <%= author.text_field :name %> - </p> + <p><%= f.label :title, l(:title) %> <%= f.text_field :title %></p> + + <h3><%= l(:authors) %></h3> + <%- f.fields_for :authors do |builder| -%> + <%= render :partial => 'authors_fields', :locals => { :f => builder} %> <%- end -%> - - + <h3>Other Details</h3> - - <% f.fields_for :bibtex_entry do |bib| -%> - <p> - <%= bib.label :year, l(:year) %> <%= bib.text_field :year %> - </p> - <p> - <%= bib.label :chapter, l(:chapter) %> <%= bib.text_field :chapter %> - </p> - <p> - <%= bib.label :editor, l(:editor) %> <%= bib.text_field :editor %> - </p> - <p> - <%= bib.label :booktitle, l(:booktitle) %> <%= bib.text_field :booktitle %> - </p> - <p> - <%= bib.label :publisher, l(:publisher) %> <%= bib.text_field :publisher %> - </p> - <p> - <%= bib.label :pages, l(:pages) %> <%= bib.text_field :pages %> - </p> - <% end -%> + + <% f.fields_for :bibtex_entry do |builder| -%> + <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> + <%- end -%> <%= f.submit %>
--- 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"