Revision 1431:303b9be118d4 plugins/redmine_bibliography/app/views/publications
| plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb | ||
|---|---|---|
| 1 |
<%- content_for :header_tags do -%> |
|
| 2 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' -%> |
|
| 3 |
<%= javascript_include_tag 'bibliography', :plugin => 'redmine_bibliography' -%> |
|
| 4 |
<%= javascript_tag "$('.author_save_btn').live('click', disable_fields);" -%>
|
|
| 5 |
<%= javascript_tag "$('.author_edit_btn').live('click', enable_fields);" -%>
|
|
| 6 |
<%- end -%> |
|
| 1 |
<div id="authors" class="fields"> |
|
| 2 |
<div class="author_edit" id="<%= form_tag_id( f.object_name, :edit_author_info ) %>"> |
|
| 7 | 3 |
|
| 8 |
<div id="authors" class="fields"> |
|
| 9 |
<div id="<%= form_tag_id( f.object_name, :search_author ) %>" style=<%= "display:none;" unless params[:action] == "new" %> > |
|
| 10 |
<p> |
|
| 11 |
<%= f.text_field :search_name, :size => 25, :class => "author_search" %> |
|
| 4 |
<p><%= f.label :name_on_paper %><%= f.text_field :name_on_paper, :class => "author_name_on_paper" -%></p> |
|
| 5 |
<p><%= f.label :institution %><%= f.text_field :institution -%></p> |
|
| 6 |
<p><%= f.label :email %><%= f.text_field :email -%></p> |
|
| 7 |
|
|
| 8 |
<p class="author_associated search_author_tie"> |
|
| 9 |
<%= f.check_box :search_author_tie, :label => '' -%> |
|
| 10 |
<span>Not associated with any SoundSoftware site user.</span> |
|
| 12 | 11 |
</p> |
| 13 | 12 |
|
| 14 |
<p style="margin-bottom: -2.5em; padding-bottom; 0"><label><%= l(:identify_author_question) %></label></p> |
|
| 15 |
|
|
| 16 |
<p class="author_identify"> |
|
| 17 |
<label class='inline'><%= radio_button_tag(:identify_author, "yes", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_yes )) %> <%= l(:identify_author_yes) %> </label><br /> |
|
| 18 |
|
|
| 19 |
<label class='inline'><%= radio_button_tag(:identify_author, "correct", false, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_corrections )) %> <%= l(:identify_author_correct) %> </label><br /> |
|
| 20 |
|
|
| 21 |
<label class='inline'><%= radio_button_tag(:identify_author, "no", true, :name => form_tag_name(f.object_name,:identify_author ), :id => form_tag_id( f.object_name, :identify_author_no )) %> <%= l(:identify_author_no) %> </label><br /> |
|
| 22 |
</p> |
|
| 23 |
</div> |
|
| 24 |
|
|
| 25 |
<div class='author_edit' id="<%= form_tag_id( f.object_name, :edit_author_info ) %>"> |
|
| 26 |
<p><%= f.text_field :name_on_paper, {:class => ("readonly" unless params[:action] == "new") } %></p>
|
|
| 27 |
<p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_name_on_paper") %></p>
|
|
| 28 |
|
|
| 29 |
<p><%= f.text_field :institution, {:class => ("readonly" unless params[:action] == "new") } %></p>
|
|
| 30 |
<p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_institution") %></p>
|
|
| 31 |
<p><%= f.text_field :email, {:class => ("readonly" unless params[:action] == "new") } %></p>
|
|
| 32 |
<p class='description' style=<%= "display:none;" unless params[:action] == "new" %>><%= h l("text_author_email") %></p>
|
|
| 33 |
|
|
| 34 |
<%= hidden_field_tag(:search_author_class, '', :name => form_tag_name(f.object_name,:search_author_class ), :id => form_tag_id( f.object_name, :search_author_class )) -%> |
|
| 35 |
|
|
| 36 |
<%= hidden_field_tag(:search_author_id, '', :name => form_tag_name(f.object_name,:search_author_id ), :id => form_tag_id( f.object_name, :search_author_id )) -%> |
|
| 13 |
<%= f.hidden_field :search_author_class -%> |
|
| 14 |
<%= f.hidden_field :search_author_id -%> |
|
| 37 | 15 |
</div> |
| 38 | 16 |
|
| 39 | 17 |
<div> |
| 40 | 18 |
<p> |
| 41 | 19 |
<%= button_to_function l(:label_save_author), '', :id => form_tag_id(f.object_name, :edit_save_button), :class => 'author_save_btn' -%> |
| 42 | 20 |
|
| 43 |
<%= button_to_function l(:label_edit_author), '', :id => form_tag_id(f.object_name, :edit_button), :class => 'author_edit_btn' -%> |
|
| 21 |
<%= button_to_function l(:label_edit_author), '', :id => form_tag_id(f.object_name, :edit_button), :class => 'author_edit_btn', :style => "display:none;" -%>
|
|
| 44 | 22 |
|
| 45 | 23 |
<%= link_to_remove_fields l("remove_author"), f %>
|
| 46 | 24 |
</p> |
| 47 | 25 |
</div> |
| 48 |
</div> |
|
| 49 |
|
|
| 26 |
</div> |
|
| plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb | ||
|---|---|---|
| 1 | 1 |
<p> |
| 2 |
<label for="bibtex_entry_type"><%=l("field_entry_type")%> <span class="required">*</span></label>
|
|
| 2 |
<label for="publication_bibtex_entry_attributes_entry_type"><%=l("field_entry_type")%> <span class="required">*</span></label>
|
|
| 3 | 3 |
<%= f.collection_select :entry_type, |
| 4 | 4 |
BibtexEntryType.find(:all).reject { |x| x.redundant? },
|
| 5 | 5 |
:id, |
| ... | ... | |
| 8 | 8 |
</p> |
| 9 | 9 |
|
| 10 | 10 |
<p class="bibtex hol"> |
| 11 |
<%= f.text_field :year, :size => 4 %>
|
|
| 11 |
<%= f.label :year %><%= f.text_field :year, :size => 5 -%>
|
|
| 12 | 12 |
</p> |
| 13 | 13 |
<p class="bibtex hol"> |
| 14 |
<%= f.text_field :month, :size => 4%>
|
|
| 14 |
<%= f.label :month %><%= f.text_field :month, :size => 5 -%>
|
|
| 15 | 15 |
</p> |
| 16 | 16 |
<p class="bibtex hol"> |
| 17 |
<%= f.text_field :chapter, :size => 15%>
|
|
| 17 |
<%= f.label :chapter %><%= f.text_field :chapter, :size => 5 -%>
|
|
| 18 | 18 |
</p> |
| 19 | 19 |
<p class="bibtex hol"> |
| 20 |
<%= f.text_field :editor, :size => 33 %>
|
|
| 20 |
<%= f.label :editor %><%= f.text_field :editor -%>
|
|
| 21 | 21 |
</p> |
| 22 | 22 |
<p class="bibtex hol"> |
| 23 |
<%= f.text_field :booktitle, :size => 33 %>
|
|
| 23 |
<%= f.label :booktitle %><%= f.text_field :booktitle -%>
|
|
| 24 | 24 |
</p> |
| 25 | 25 |
<p class="bibtex hol"> |
| 26 |
<%= f.text_field :publisher,:size => 33 %>
|
|
| 26 |
<%= f.label :publisher %><%= f.text_field :publisher -%>
|
|
| 27 | 27 |
</p> |
| 28 | 28 |
<p class="bibtex hol"> |
| 29 |
<%= f.text_field :pages, :size => 12 %>
|
|
| 29 |
<%= f.label :pages %><%= f.text_field :pages, :size => 5 -%>
|
|
| 30 | 30 |
</p> |
| 31 | 31 |
<p class="bibtex hol"> |
| 32 |
<%= f.text_field :address %>
|
|
| 32 |
<%= f.label :address %><%= f.text_field :address -%>
|
|
| 33 | 33 |
</p> |
| 34 | 34 |
<p class="bibtex hol"> |
| 35 |
<%= f.text_field :annote %>
|
|
| 35 |
<%= f.label :annote %><%= f.text_field :annote -%>
|
|
| 36 | 36 |
</p> |
| 37 | 37 |
<p class="bibtex hol"> |
| 38 |
<%= f.text_field :crossref %>
|
|
| 38 |
<%= f.label :crossref %><%= f.text_field :crossref -%>
|
|
| 39 | 39 |
</p> |
| 40 | 40 |
<p class="bibtex hol"> |
| 41 |
<%= f.text_field :edition %>
|
|
| 41 |
<%= f.label :edition %><%= f.text_field :edition -%>
|
|
| 42 | 42 |
</p> |
| 43 | 43 |
<p class="bibtex hol"> |
| 44 |
<%= f.text_field :eprint %>
|
|
| 44 |
<%= f.label :eprint %><%= f.text_field :eprint -%>
|
|
| 45 | 45 |
</p> |
| 46 | 46 |
<p class="bibtex hol"> |
| 47 |
<%= f.text_field :howpublished %>
|
|
| 47 |
<%= f.label :howpublished %><%= f.text_field :howpublished -%>
|
|
| 48 | 48 |
</p> |
| 49 | 49 |
<p class="bibtex hol"> |
| 50 |
<%= f.text_field :journal %>
|
|
| 50 |
<%= f.label :journal %><%= f.text_field :journal -%>
|
|
| 51 | 51 |
</p> |
| 52 | 52 |
<p class="bibtex hol"> |
| 53 |
<%= f.text_field :key %>
|
|
| 53 |
<%= f.label :key %><%= f.text_field :key -%>
|
|
| 54 | 54 |
</p> |
| 55 | 55 |
<p class="bibtex hol"> |
| 56 |
<%= f.text_field :note %>
|
|
| 56 |
<%= f.label :note %><%= f.text_field :note -%>
|
|
| 57 | 57 |
</p> |
| 58 | 58 |
<p class="bibtex hol"> |
| 59 |
<%= f.text_field :number %>
|
|
| 59 |
<%= f.label :number %><%= f.text_field :number, :size => 5 -%>
|
|
| 60 | 60 |
</p> |
| 61 | 61 |
<p class="bibtex hol"> |
| 62 |
<%= f.text_field :organization %> |
|
| 62 |
<%= f.label :organization %><%= f.text_field :organization %>
|
|
| 63 | 63 |
</p> |
| 64 | 64 |
<p class="bibtex hol"> |
| 65 |
<%= f.text_field :school %> |
|
| 65 |
<%= f.label :school %><%= f.text_field :school %>
|
|
| 66 | 66 |
</p> |
| 67 | 67 |
<p class="bibtex hol"> |
| 68 |
<%= f.text_field :series %> |
|
| 68 |
<%= f.label :series %><%= f.text_field :series %>
|
|
| 69 | 69 |
</p> |
| 70 | 70 |
<p class="bibtex hol"> |
| 71 |
<%= f.text_field :type %> |
|
| 71 |
<%= f.label :type %><%= f.text_field :type %>
|
|
| 72 | 72 |
</p> |
| 73 | 73 |
<p class="bibtex hol"> |
| 74 |
<%= f.text_field :url %> |
|
| 74 |
<%= f.label :url %><%= f.text_field :url %>
|
|
| 75 | 75 |
</p> |
| 76 | 76 |
<p class="bibtex hol"> |
| 77 |
<%= f.text_field :volume %> |
|
| 77 |
<%= f.label :volume %><%= f.text_field :volume %>
|
|
| 78 | 78 |
</p> |
| plugins/redmine_bibliography/app/views/publications/_form.html.erb | ||
|---|---|---|
| 1 |
<%= error_messages_for 'publication' %> |
|
| 2 |
<%= javascript_tag " |
|
| 3 |
$('#publication_bibtex_entry_attributes_entry_type').live('change', function() {
|
|
| 4 |
$this = $(this); |
|
| 5 |
$.ajax({
|
|
| 6 |
type: 'get', |
|
| 7 |
url: '#{url_for(:controller => :publications, :action => :show_bibtex_fields)}',
|
|
| 8 |
data: {
|
|
| 9 |
value: $this.val() |
|
| 10 |
}, |
|
| 11 |
dataType: 'script' |
|
| 12 |
}); |
|
| 13 |
return false; |
|
| 14 |
});" |
|
| 15 |
-%> |
|
| 16 |
|
|
| 17 |
<h3><%= f.text_field :title, :required => true, :size => 70 %></h3> |
|
| 1 |
<h3><%= f.label :title %> <span class="required">*</span> <%= f.text_field :title, :required => true, :size => 70 %></h3> |
|
| 18 | 2 |
|
| 19 | 3 |
<div class="splitcontentleft"> |
| 20 | 4 |
<h3><%= l(:label_publication_other_details) %></h3> |
| ... | ... | |
| 24 | 8 |
<%- end -%> |
| 25 | 9 |
|
| 26 | 10 |
<p> |
| 27 |
<%= f.text_field :external_url, :size => 70 %>
|
|
| 11 |
<%= f.label :external_url %><%= f.text_field :external_url -%>
|
|
| 28 | 12 |
<br /> |
| 29 |
<em><%= l(:text_external_url) %></em> |
|
| 13 |
<em><%= l(:text_external_url) -%></em>
|
|
| 30 | 14 |
</p> |
| 31 | 15 |
<p> |
| 32 |
<%= f.text_field :doi, :size => 70 %>
|
|
| 16 |
<%= f.label :doi %><%= f.text_field :doi -%>
|
|
| 33 | 17 |
<br /> |
| 34 | 18 |
<em><%= l(:text_doi) %></em> |
| 35 | 19 |
</p> |
| plugins/redmine_bibliography/app/views/publications/autocomplete_for_author.html.erb | ||
|---|---|---|
| 1 |
<%= raw @results.map {|result| {
|
|
| 2 |
'label' => "#{result.name} <em>#{result.mail.partition('@')[2]}</em>",
|
|
| 1 |
<%= raw @results.map { |result|
|
|
| 2 |
{
|
|
| 3 |
'label' => result.name, |
|
| 3 | 4 |
'value' => result.name, |
| 4 | 5 |
'search_author_class' => result.class.name, |
| 5 | 6 |
'search_author_id' => result.id, |
| 6 | 7 |
'name' => result.name, |
| 7 | 8 |
'institution' => result.institution, |
| 8 | 9 |
'email' => result.mail, |
| 10 |
'authorship_link' => " Keep associated with #{render_authorship_link(result.class.name, result.id)}"
|
|
| 9 | 11 |
} |
| 10 | 12 |
}.to_json %> |
| plugins/redmine_bibliography/app/views/publications/edit.html.erb | ||
|---|---|---|
| 1 | 1 |
<% content_for :header_tags do %> |
| 2 |
<%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %> |
|
| 3 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> |
|
| 4 |
<%= javascript_tag "$(document).ready(function() { $('#publication_bibtex_entry_attributes_entry_type').trigger('change'); });" %>
|
|
| 2 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' -%> |
|
| 3 |
<%= javascript_include_tag 'bibliography', :plugin => 'redmine_bibliography' -%> |
|
| 4 |
<%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' -%> |
|
| 5 |
|
|
| 6 |
<%= javascript_include_tag 'edit_publication', :plugin => 'redmine_bibliography' -%> |
|
| 7 |
|
|
| 8 |
<%= javascript_tag "$('#publication_bibtex_entry_attributes_entry_type').live('change', function() {
|
|
| 9 |
$this = $(this); |
|
| 10 |
$.ajax({
|
|
| 11 |
type: 'get', |
|
| 12 |
url: '#{url_for(:controller => :publications, :action => :show_bibtex_fields)}',
|
|
| 13 |
data: {
|
|
| 14 |
value: $this.val() |
|
| 15 |
}, |
|
| 16 |
dataType: 'script' |
|
| 17 |
}); return false; });" -%> |
|
| 18 |
|
|
| 19 |
<%= javascript_tag "authorship_autocomplete('#{url_for :controller => :publications, :action => :autocomplete_for_author}');" -%>
|
|
| 20 |
|
|
| 5 | 21 |
<% end %> |
| 6 | 22 |
|
| 23 |
<%= error_messages_for 'publication' %> |
|
| 24 |
|
|
| 7 | 25 |
<h2><%=l(:label_publication_show)%></h2> |
| 8 | 26 |
|
| 9 |
<%= labelled_form_for @publication, :url => { :project_id => @project, :action => :update } do |f| -%>
|
|
| 10 |
<%= render :partial => 'form', :locals => { :f => f } %>
|
|
| 27 |
<%= form_for @publication, :url => { :project_id => @project, :action => :update } do |f| -%>
|
|
| 11 | 28 |
|
| 12 |
<div style="clear:both"></div> |
|
| 13 |
<%= f.submit %> |
|
| 29 |
<%= render :partial => 'form', :locals => { :f => f } %>
|
|
| 30 |
|
|
| 31 |
<div style="clear:both"></div> |
|
| 32 |
<%= f.submit %> |
|
| 14 | 33 |
<% end %> |
| 34 |
|
|
| 15 | 35 |
<p> |
| 16 |
<%= link_to l(:label_publication_show), { :controller => "publications", :action => "show", :id => @publication, :project_id => @project_id } %> |
|
|
| 17 |
<%= link_to l(:label_publication_index), { :controller => "publications", :action => "index", :project_id => @project } %>
|
|
| 36 |
<%= link_to l(:label_publication_show), { :controller => "publications", :action => "show", :id => @publication, :project_id => @project_id } %> |
|
|
| 37 |
<%= link_to l(:label_publication_index), { :controller => "publications", :action => "index", :project_id => @project } %>
|
|
| 18 | 38 |
</p> |
| 19 | 39 |
|
| plugins/redmine_bibliography/app/views/publications/new.html.erb | ||
|---|---|---|
| 1 | 1 |
<% content_for :header_tags do %> |
| 2 | 2 |
<%= javascript_include_tag 'authors', :plugin => 'redmine_bibliography' %> |
| 3 | 3 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> |
| 4 |
<%= javascript_include_tag 'bibliography', :plugin => 'redmine_bibliography' -%> |
|
| 5 |
<%= javascript_include_tag 'new_publication', :plugin => 'redmine_bibliography' -%> |
|
| 6 |
|
|
| 7 |
<%= javascript_tag " |
|
| 8 |
$('#publication_bibtex_entry_attributes_entry_type').live('change', function() {
|
|
| 9 |
$this = $(this); |
|
| 10 |
$.ajax({
|
|
| 11 |
type: 'get', |
|
| 12 |
url: '#{url_for(:controller => :publications, :action => :show_bibtex_fields)}',
|
|
| 13 |
data: {
|
|
| 14 |
value: $this.val() |
|
| 15 |
}, |
|
| 16 |
dataType: 'script' |
|
| 17 |
}); |
|
| 18 |
return false; |
|
| 19 |
});"-%> |
|
| 20 |
|
|
| 21 |
<%= javascript_tag "authorship_autocomplete('#{url_for :controller => :publications, :action => :autocomplete_for_author}');" -%>
|
|
| 22 |
|
|
| 4 | 23 |
<% end %> |
| 5 | 24 |
|
| 25 |
<%= error_messages_for 'publication' %> |
|
| 26 |
|
|
| 6 | 27 |
<h2><%=l(:label_publication_new)%></h2> |
| 7 | 28 |
|
| 8 |
<%= labelled_form_for @publication, :url => { :project_id => @project, :action => :create } do |f| -%>
|
|
| 29 |
<%= form_for @publication, :url => { :project_id => @project, :action => :create } do |f| -%>
|
|
| 30 |
|
|
| 9 | 31 |
<%= render :partial => 'form', :locals => { :f => f } %>
|
| 32 |
|
|
| 10 | 33 |
<div style="clear:both"></div> |
| 11 | 34 |
<%= f.submit %> |
| 12 | 35 |
<% end %> |
Also available in: Unified diff