Revision 1026:b42553f6df71 vendor/plugins
| vendor/plugins/redmine_bibliography/app/models/publication.rb | ||
|---|---|---|
| 82 | 82 |
end |
| 83 | 83 |
|
| 84 | 84 |
if style == :ieee |
| 85 |
CiteProc.process bib.to_citeproc, :style => :ieee, :format => :html |
|
| 86 |
else |
|
| 87 |
bib.to_s :include => :meta_content |
|
| 85 |
CiteProc.process bib.to_citeproc, :style => :ieee, :format => :html |
|
| 86 |
else |
|
| 87 |
bibtex = bib.to_s :include => :meta_content |
|
| 88 |
bibtex.strip! |
|
| 89 |
logger.error { bibtex }
|
|
| 88 | 90 |
end |
| 89 | 91 |
end |
| 90 | 92 |
end |
| vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> |
|
| 3 |
<%= javascript_include_tag 'bibtex', :plugin => 'redmine_bibliography' -%> |
|
| 4 |
<% end %> |
|
| 5 |
|
|
| 1 | 6 |
<% if @project.publications.any? %> |
| 2 | 7 |
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> |
| 3 | 8 |
<div id="bibliography"> |
| 4 | 9 |
<div class="box"> |
| 5 | 10 |
<h3><%=l(:label_related_publication_plural)%></h3> |
| 6 | 11 |
|
| 7 |
<dl>
|
|
| 8 |
<% @project.publications.each do |publication| %> |
|
| 9 |
<dt> |
|
| 10 |
<span class="authors">
|
|
| 11 |
<%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %><% if !publication.authorships.empty? %>.<% end %>
|
|
| 12 |
</span>
|
|
| 13 |
<span class="title"><%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication, :project_id => @project %></span>
|
|
| 14 |
<% if publication.bibtex_entry.year.to_s != "" %> |
|
| 15 |
<span class="year">
|
|
| 16 |
(<%= publication.bibtex_entry.year %>)
|
|
| 17 |
</span>
|
|
| 18 |
<% end %>
|
|
| 19 |
</dt><dd></dd>
|
|
| 12 |
<dl>
|
|
| 13 |
<% @project.publications.each do |publication| %>
|
|
| 14 |
<dt>
|
|
| 15 |
<%= publication.print_entry(:ieee) -%>
|
|
| 16 |
</dt>
|
|
| 17 |
<dd>
|
|
| 18 |
<%= link_to("[More Details]", {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
|
|
| 19 |
|
|
| 20 |
<%= link_to_function "[Bibtex]", onclick="toggleBibtex(this)" -%>
|
|
| 21 |
</dd>
|
|
| 22 |
<dd class="bibtex-textarea collapsed" style="display: none;">
|
|
| 23 |
<textarea readonly><%= publication.print_entry(:bibtex) -%></textarea>
|
|
| 24 |
</dd>
|
|
| 20 | 25 |
<% end -%> |
| 21 |
</dl> |
|
| 26 |
</dl>
|
|
| 22 | 27 |
</div> |
| 23 | 28 |
</div> |
| 24 |
<% end %> |
|
| 29 |
<% end -%> |
|
| vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb | ||
|---|---|---|
| 4 | 4 |
|
| 5 | 5 |
<div class="box"> |
| 6 | 6 |
<h3>Publication Info</h3> |
| 7 |
<%=h show_cite_proc_entry(@publication)%> |
|
| 8 |
|
|
| 9 |
<br /> |
|
| 10 |
<br /> |
|
| 11 |
<h4>Bibtex Code</h4> |
|
| 12 |
<%= text_area_tag :bibtex_code, h(print_bibtex_entry(@publication)), :readonly => true, :rows => 6, :style => 'width:90%' %> |
|
| 13 |
|
|
| 7 |
<%= show_cite_proc_entry(@publication)%> |
|
| 8 |
|
|
| 9 |
<h3>Bibtex Format</h3> |
|
| 10 |
<%=h print_bibtex_entry(@publication) %> |
|
| 14 | 11 |
</div> |
| 15 | 12 |
|
| 16 | 13 |
<div class="box"> |
| ... | ... | |
| 31 | 28 |
<%= sortable_element("authorships", :url => { :controller => :publications, :action => :sort_author_order }, :handle => "handle") %>
|
| 32 | 29 |
<%- end -%> |
| 33 | 30 |
|
| 31 |
<%- if @publication.bibtex_entry != nil -%> |
|
| 32 |
<%= show_bibtex_fields(@publication.bibtex_entry) %> |
|
| 33 |
<%- end -%> |
|
| 34 |
|
|
| 34 | 35 |
<% unless @publication.external_url.blank? %> |
| 35 | 36 |
<h4> |
| 36 | 37 |
<%= l(:field_external_url) %> |
| vendor/plugins/redmine_bibliography/assets/javascripts/bibtex.js | ||
|---|---|---|
| 1 |
function toggleBibtex(el) {
|
|
| 2 |
var dd = Element.up(el).next('dd')
|
|
| 3 |
|
|
| 4 |
dd.toggleClassName('collapsed');
|
|
| 5 |
Effect.toggle(dd, 'slide', {duration:0.2});
|
|
| 6 |
} |
|
| vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css | ||
|---|---|---|
| 32 | 32 |
min-width: 150px; |
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 |
div#bibliography dl { margin-left: 2em; }
|
|
| 36 |
div#bibliography .box dl { margin-left: 0; }
|
|
| 37 |
div#bibliography dt { margin-bottom: 0px; padding-left: 20px }
|
|
| 38 |
div#bibliography .box dt { margin-bottom: 0px; padding-left: 10px }
|
|
| 35 |
|
|
| 39 | 36 |
div#bibliography dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
|
| 40 |
div#bibliography .box dd { margin-bottom: 0.6em; padding-left: 0; }
|
|
| 37 |
|
|
| 41 | 38 |
div#bibliography dd .authors { font-style: italic; }
|
| 42 |
div#bibliography dt .title { font-style: italic; }
|
|
| 43 | 39 |
div#bibliography dd span.authors { color: #808080; }
|
| 44 | 40 |
div#bibliography dd span.year { padding-left: 0.6em; }
|
| 45 | 41 |
|
| 46 |
div#bibliography h3 { background: url(../../../images/table_multiple.png) no-repeat 0% 50%; padding-left: 20px; }
|
|
| 42 |
div#bibliography .box dt {
|
|
| 43 |
background: url(../../../images/document.png) no-repeat 0% 50%; padding-left: 20px; |
|
| 44 |
margin-left: 2em; |
|
| 45 |
} |
|
| 46 |
div#bibliography .box dd {
|
|
| 47 |
margin-left: 25px; |
|
| 48 |
} |
|
| 47 | 49 |
|
| 50 |
div#bibliography h3 {
|
|
| 51 |
background: url(../../../images/table_multiple.png) no-repeat 0% 50%; |
|
| 52 |
padding-left: 20px; |
|
| 53 |
} |
|
| 48 | 54 |
|
| 55 |
div#bibliography textarea {
|
|
| 56 |
width: 90%; |
|
| 57 |
height: 200px; |
|
| 58 |
font: normal 8px; |
|
| 59 |
padding: 2px 10px; |
|
| 60 |
border: solid 1px #ddd; |
|
| 61 |
} |
|
| vendor/plugins/redmine_tags/app/controllers/tags_controller.rb | ||
|---|---|---|
| 1 |
class TagsController < ApplicationController |
|
| 2 |
|
|
| 3 |
def index |
|
| 4 |
respond_to do |format| |
|
| 5 |
format.html {
|
|
| 6 |
render :template => 'tags/index.html.erb', :layout => !request.xhr? |
|
| 7 |
} |
|
| 8 |
format.api {
|
|
| 9 |
} |
|
| 10 |
format.atom {
|
|
| 11 |
} |
|
| 12 |
end |
|
| 13 |
end |
|
| 14 |
|
|
| 15 |
end |
|
| vendor/plugins/redmine_tags/app/helpers/tags_helper.rb | ||
|---|---|---|
| 40 | 40 |
content_tag('span', content, :class => 'tag-label')
|
| 41 | 41 |
end |
| 42 | 42 |
|
| 43 |
def render_project_tag_link(tag) |
|
| 43 |
def render_project_tag_link(tag, options = {})
|
|
| 44 | 44 |
content = link_to tag.name, :controller => :projects, :action => :index, :project => { :tag_list => tag.name }
|
| 45 |
if options[:show_count] |
|
| 46 |
content << content_tag('span', "(#{tag.count})", :class => 'tag-count')
|
|
| 47 |
end |
|
| 45 | 48 |
content_tag('span', content, :class => 'tag-label')
|
| 46 | 49 |
end |
| 47 | 50 |
|
| ... | ... | |
| 73 | 76 |
end |
| 74 | 77 |
|
| 75 | 78 |
tag_cloud tags, (1..8).to_a do |tag, weight| |
| 76 |
content << " " + content_tag(item_el, render_tag_link(tag, options), :class => "tag-nube-#{weight}") + " "
|
|
| 79 |
content << " " + content_tag(item_el, render_project_tag_link(tag, options), :class => "tag-nube-#{weight}") + " "
|
|
| 77 | 80 |
end |
| 78 | 81 |
|
| 79 | 82 |
content_tag(list_el, content, :class => 'tags') |
| vendor/plugins/redmine_tags/app/views/projects/_tagcloud.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 3 |
<% end %> |
|
| 4 |
|
|
| 5 |
<div id="tags"> |
|
| 6 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
|
| 7 |
</div> |
|
| 8 |
|
|
| 9 |
|
|
| vendor/plugins/redmine_tags/app/views/projects/index.html.erb | ||
|---|---|---|
| 11 | 11 |
</div> |
| 12 | 12 |
|
| 13 | 13 |
|
| 14 |
|
|
| 15 | 14 |
<div style="clear:both;"></div> |
| 16 | 15 |
<% if User.current.logged? %> |
| 17 | 16 |
<%= render :partial => 'my_projects' %> |
| vendor/plugins/redmine_tags/app/views/tags/index.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
|
| 3 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 4 |
<% end %> |
|
| 5 |
|
|
| 6 |
|
|
| 7 |
<div style="clear:both;"></div> |
|
| 8 |
<h2> |
|
| 9 |
<%= l("label_project_tags_all") %>
|
|
| 10 |
</h2> |
|
| 11 |
|
|
| 12 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
|
| 13 |
|
|
| vendor/plugins/redmine_tags/assets/stylesheets/redmine_tags.css | ||
|---|---|---|
| 22 | 22 |
ul.tags li { margin: .25em 0px; }
|
| 23 | 23 |
|
| 24 | 24 |
div.tags { text-align: center; }
|
| 25 |
div.tags h3 { text-align: left; }
|
|
| 25 | 26 |
div.tags .tag-label { margin: .25em; }
|
| 26 | 27 |
div.tags .tag-nube-1 { font-size: .8em; }
|
| 27 | 28 |
div.tags .tag-nube-2 { font-size: .9em; }
|
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb | ||
|---|---|---|
| 1 |
# -*- coding: utf-8 -*- |
|
| 1 | 2 |
require_dependency 'projects_controller' |
| 2 | 3 |
|
| 3 | 4 |
module RedmineTags |
| ... | ... | |
| 127 | 128 |
end |
| 128 | 129 |
|
| 129 | 130 |
unless @tag_list.empty? |
| 130 |
@tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id) }
|
|
| 131 |
@tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id).root }
|
|
| 131 | 132 |
@projects = @projects & @tagged_projects_ids |
| 133 |
@projects = @projects.uniq |
|
| 132 | 134 |
end |
| 133 |
|
|
| 134 |
@projects = @projects.collect{ |project| project.root }
|
|
| 135 |
@projects = @projects.uniq |
|
| 136 |
|
|
| 137 | 135 |
end |
| 138 | 136 |
end |
| 139 | 137 |
end |
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb | ||
|---|---|---|
| 4 | 4 |
|
| 5 | 5 |
def self.included(base) # :nodoc: |
| 6 | 6 |
base.send(:include, InstanceMethods) |
| 7 |
base.send(:include, TagsHelper) |
|
| 7 | 8 |
base.class_eval do |
| 8 | 9 |
unloadable |
| 9 | 10 |
end |
Also available in: Unified diff