Revision 1026:b42553f6df71
| .hgignore | ||
|---|---|---|
| 29 | 29 |
.svn/ |
| 30 | 30 |
.git/ |
| 31 | 31 |
*~ |
| 32 |
|
|
| 32 |
public/themes/soundsoftware/stylesheets/fonts/* |
|
| 33 | 33 |
|
| 34 | 34 |
.bundle |
| 35 | 35 |
Gemfile.lock |
| 36 | 36 |
Gemfile.local |
| 37 | 37 |
|
| 38 |
re:^config\.ru$ |
|
| app/controllers/activities_controller.rb | ||
|---|---|---|
| 40 | 40 |
|
| 41 | 41 |
events = @activity.events(@date_from, @date_to) |
| 42 | 42 |
|
| 43 |
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language]) |
|
| 43 |
@institution_name = params[:institution] |
|
| 44 |
if !@institution_name.blank? |
|
| 45 |
events = events.select do |e| |
|
| 46 |
e.respond_to?(:event_author) and e.event_author and |
|
| 47 |
e.event_author.respond_to?(:ssamr_user_detail) and |
|
| 48 |
!e.event_author.ssamr_user_detail.nil? and |
|
| 49 |
e.event_author.ssamr_user_detail.institution_name == @institution_name |
|
| 50 |
end |
|
| 51 |
if events.empty? |
|
| 52 |
# We don't want to dump into the output any arbitrary string |
|
| 53 |
# from the URL that has no matching events |
|
| 54 |
@institution_name = "" |
|
| 55 |
end |
|
| 56 |
end |
|
| 57 |
|
|
| 58 |
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, @institution_name, events.first, User.current, current_language]) |
|
| 44 | 59 |
respond_to do |format| |
| 45 | 60 |
format.html {
|
| 46 | 61 |
@events_by_day = events.group_by(&:event_date) |
| app/controllers/attachments_controller.rb | ||
|---|---|---|
| 17 | 17 |
|
| 18 | 18 |
class AttachmentsController < ApplicationController |
| 19 | 19 |
|
| 20 |
include AttachmentsHelper |
|
| 21 |
helper :attachments |
|
| 22 |
|
|
| 20 | 23 |
before_filter :find_project |
| 21 | 24 |
before_filter :file_readable, :read_authorize, :except => :destroy |
| 22 | 25 |
before_filter :delete_authorize, :only => :destroy |
| ... | ... | |
| 49 | 52 |
end |
| 50 | 53 |
|
| 51 | 54 |
def download |
| 52 |
if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project) |
|
| 55 |
# cc: formerly this happened only if "@attachment.container.is_a?(Version)" |
|
| 56 |
# or Project. Not good for us, we want to tally all downloads [by humans] |
|
| 57 |
if not user_is_search_bot? |
|
| 53 | 58 |
@attachment.increment_download |
| 54 | 59 |
end |
| 55 | 60 |
|
| app/controllers/projects_controller.rb | ||
|---|---|---|
| 20 | 20 |
menu_item :roadmap, :only => :roadmap |
| 21 | 21 |
menu_item :settings, :only => :settings |
| 22 | 22 |
|
| 23 |
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ] |
|
| 24 |
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy] |
|
| 23 |
before_filter :find_project, :except => [ :index, :list, :explore, :new, :create, :copy ]
|
|
| 24 |
before_filter :authorize, :except => [ :index, :list, :explore, :new, :create, :copy, :archive, :unarchive, :destroy]
|
|
| 25 | 25 |
before_filter :authorize_global, :only => [:new, :create] |
| 26 | 26 |
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] |
| 27 | 27 |
accept_rss_auth :index |
| ... | ... | |
| 43 | 43 |
helper :repositories |
| 44 | 44 |
include RepositoriesHelper |
| 45 | 45 |
include ProjectsHelper |
| 46 |
include ActivitiesHelper |
|
| 47 |
helper :activities |
|
| 46 | 48 |
|
| 47 | 49 |
# Lists visible projects. Paginator is for top-level projects only |
| 48 | 50 |
# (subprojects belong to them) |
| ... | ... | |
| 76 | 78 |
end |
| 77 | 79 |
end |
| 78 | 80 |
|
| 81 |
# A different view of projects using explore boxes |
|
| 82 |
def explore |
|
| 83 |
respond_to do |format| |
|
| 84 |
format.html {
|
|
| 85 |
@projects = Project.visible |
|
| 86 |
render :template => 'projects/explore.html.erb', :layout => !request.xhr? |
|
| 87 |
} |
|
| 88 |
end |
|
| 89 |
end |
|
| 90 |
|
|
| 79 | 91 |
def new |
| 80 | 92 |
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
|
| 81 | 93 |
@trackers = Tracker.all |
| app/controllers/sys_controller.rb | ||
|---|---|---|
| 21 | 21 |
def projects |
| 22 | 22 |
p = Project.active.has_module(:repository).find(:all, :include => :repository, :order => 'identifier') |
| 23 | 23 |
# extra_info attribute from repository breaks activeresource client |
| 24 |
render :xml => p.to_xml(:only => [:id, :identifier, :name, :is_public, :status], :include => {:repository => {:only => [:id, :url]}})
|
|
| 24 |
render :xml => p.to_xml(:only => [:id, :identifier, :name, :is_public, :status], :include => {:repository => {:only => [:id, :url, :is_external, :external_url]}})
|
|
| 25 | 25 |
end |
| 26 | 26 |
|
| 27 | 27 |
def create_project_repository |
| app/controllers/welcome_controller.rb | ||
|---|---|---|
| 25 | 25 |
@site_project = Project.find_by_identifier "soundsoftware-site" |
| 26 | 26 |
@site_news = [] |
| 27 | 27 |
@site_news = News.latest_for @site_project if @site_project |
| 28 |
@projects = Project.latest User.current |
|
| 29 | 28 |
|
| 30 | 29 |
# tests if user is logged in to generate the tips of the day list |
| 31 | 30 |
if User.current.logged? |
| app/helpers/activities_helper.rb | ||
|---|---|---|
| 1 |
|
|
| 2 |
module ActivitiesHelper |
|
| 3 |
|
|
| 4 |
def busy_projects(events, count) |
|
| 5 |
# Transform events list into hash from project id to number of |
|
| 6 |
# occurrences of project in list (there is surely a tidier way |
|
| 7 |
# to do this, e.g. chunk() in Ruby 1.9 but not in 1.8) |
|
| 8 |
phash = events.map { |e| e.project unless !e.respond_to?(:project) }.sort.group_by { |p| p.id }
|
|
| 9 |
phash = phash.merge(phash) { |k,v| v.length }
|
|
| 10 |
threshold = phash.values.sort.last(count).first |
|
| 11 |
busy = phash.keys.select { |k| phash[k] >= threshold }.sample(count)
|
|
| 12 |
busy.map { |pid| Project.find(pid) }
|
|
| 13 |
end |
|
| 14 |
|
|
| 15 |
def busy_institutions(events, count) |
|
| 16 |
authors = events.map do |e| |
|
| 17 |
e.event_author unless !e.respond_to?(:event_author) |
|
| 18 |
end.compact |
|
| 19 |
institutions = authors.map do |a| |
|
| 20 |
if a.respond_to?(:ssamr_user_detail) and !a.ssamr_user_detail.nil? |
|
| 21 |
a.ssamr_user_detail.institution_name |
|
| 22 |
end |
|
| 23 |
end |
|
| 24 |
insthash = institutions.compact.sort.group_by { |i| i }
|
|
| 25 |
insthash = insthash.merge(insthash) { |k,v| v.length }
|
|
| 26 |
threshold = insthash.values.sort.last(count).first |
|
| 27 |
insthash.keys.select { |k| insthash[k] >= threshold }.sample(count)
|
|
| 28 |
end |
|
| 29 |
|
|
| 30 |
end |
|
| app/helpers/application_helper.rb | ||
|---|---|---|
| 291 | 291 |
def principals_check_box_tags(name, principals) |
| 292 | 292 |
s = '' |
| 293 | 293 |
principals.sort.each do |principal| |
| 294 |
s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n"
|
|
| 294 |
|
|
| 295 |
if principal.type == "User": |
|
| 296 |
s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n"
|
|
| 297 |
else |
|
| 298 |
s << "<label>#{ check_box_tag name, principal.id, false } #{h principal} (Group)</label>\n"
|
|
| 299 |
end |
|
| 300 |
|
|
| 295 | 301 |
end |
| 296 | 302 |
s.html_safe |
| 297 | 303 |
end |
| app/helpers/attachments_helper.rb | ||
|---|---|---|
| 42 | 42 |
api.created_on attachment.created_on |
| 43 | 43 |
end |
| 44 | 44 |
end |
| 45 |
|
|
| 46 |
# Returns true if user agent appears (approximately) to be a search |
|
| 47 |
# bot or crawler |
|
| 48 |
def user_is_search_bot? |
|
| 49 |
agent = request.env['HTTP_USER_AGENT'] |
|
| 50 |
agent and agent =~ /(bot|slurp|crawler|spider)\b/i |
|
| 51 |
end |
|
| 45 | 52 |
end |
| app/helpers/projects_helper.rb | ||
|---|---|---|
| 162 | 162 |
|
| 163 | 163 |
end |
| 164 | 164 |
|
| 165 |
# Renders a tree of projects that the current user does not belong |
|
| 166 |
# to, or of all projects if the current user is not logged in. The |
|
| 167 |
# given collection may be a subset of the whole project tree |
|
| 168 |
# (eg. some intermediate nodes are private and can not be seen). We |
|
| 169 |
# are potentially interested in various things: the project name, |
|
| 170 |
# description, manager(s), creation date, last activity date, |
|
| 171 |
# general activity level, whether there is anything actually hosted |
|
| 172 |
# here for the project, etc. |
|
| 165 |
# Renders a tree of projects. The given collection may be a subset |
|
| 166 |
# of the whole project tree (eg. some intermediate nodes are private |
|
| 167 |
# and can not be seen). We are potentially interested in various |
|
| 168 |
# things: the project name, description, manager(s), creation date, |
|
| 169 |
# last activity date, general activity level, whether there is |
|
| 170 |
# anything actually hosted here for the project, etc. |
|
| 173 | 171 |
def render_project_table(projects) |
| 174 | 172 |
|
| 175 | 173 |
s = "" |
| app/models/mailer.rb | ||
|---|---|---|
| 32 | 32 |
{ :host => h, :protocol => Setting.protocol }
|
| 33 | 33 |
end |
| 34 | 34 |
|
| 35 |
# todo: luisf: 2Aug2012 - refactor... |
|
| 36 |
def added_to_project(member, project) |
|
| 37 |
principal = Principal.find(member.user_id) |
|
| 35 | 38 |
|
| 39 |
if principal.type == "User" |
|
| 40 |
user = User.find(member.user_id) |
|
| 41 |
user_add_to_project(user, project) |
|
| 42 |
else |
|
| 43 |
users = Principal.find(member.user_id).users |
|
| 44 |
users.map {|user| user_add_to_project(user, project) }
|
|
| 45 |
end |
|
| 46 |
end |
|
| 36 | 47 |
|
| 37 | 48 |
# Builds a tmail object used to email the specified user that he was added to a project |
| 38 | 49 |
# |
| 39 | 50 |
# Example: |
| 40 |
# add_to_project(user) => tmail object |
|
| 41 |
# Mailer.deliver_add_to_project(user) => sends an email to the registered user |
|
| 42 |
def added_to_project(member, project) |
|
| 43 |
|
|
| 44 |
user = User.find(member.user_id) |
|
| 45 |
|
|
| 51 |
# user_add_to_project(user, project) => tmail object |
|
| 52 |
# Mailer.deliver_add_to_project(user, project) => sends an email to the registered user |
|
| 53 |
def user_add_to_project(user, project) |
|
| 46 | 54 |
set_language_if_valid user.language |
| 47 | 55 |
recipients user.mail |
| 48 | 56 |
subject l(:mail_subject_added_to_project, Setting.app_title) |
| ... | ... | |
| 50 | 58 |
:project_name => project.name |
| 51 | 59 |
render_multipart('added_to_project', body)
|
| 52 | 60 |
end |
| 53 |
|
|
| 54 |
|
|
| 55 | 61 |
|
| 56 | 62 |
# Builds a tmail object used to email recipients of the added issue. |
| 57 | 63 |
# |
| app/views/activities/_busy.html.erb | ||
|---|---|---|
| 1 |
<% events = @events_by_day %> |
|
| 2 |
<% if (events.nil?) |
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current) |
|
| 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
|
| 5 |
end |
|
| 6 |
%> |
|
| 7 |
|
|
| 8 |
<% if events.empty? %> |
|
| 9 |
|
|
| 10 |
<% else %> |
|
| 11 |
|
|
| 12 |
<ul> |
|
| 13 |
|
|
| 14 |
<% |
|
| 15 |
for project in busy_projects(events, 5) |
|
| 16 |
%> |
|
| 17 |
|
|
| 18 |
<li class="busy"> |
|
| 19 |
<span class="title"> |
|
| 20 |
<% if !project.root? %> |
|
| 21 |
<% project.ancestors.each do |p| %> |
|
| 22 |
<%= h(p) %> » |
|
| 23 |
<% end %> |
|
| 24 |
<% end %> |
|
| 25 |
<%= link_to_project project %> |
|
| 26 |
</span> |
|
| 27 |
<% if !project.is_public? %> |
|
| 28 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 29 |
<% end %> |
|
| 30 |
<span class='managers'> |
|
| 31 |
<% |
|
| 32 |
u = project.users_by_role |
|
| 33 |
if ! u.empty? %> |
|
| 34 |
(<%= |
|
| 35 |
mgmt_roles = u.keys.select{ |r| r.allowed_to?(:edit_project) }
|
|
| 36 |
managers = mgmt_roles.map{ |r| u[r] }.flatten.sort.uniq
|
|
| 37 |
managers.map{ |m| m.name }.join(', ')
|
|
| 38 |
%>)<% |
|
| 39 |
end |
|
| 40 |
%> |
|
| 41 |
</span> |
|
| 42 |
|
|
| 43 |
<%= render_project_short_description project %> |
|
| 44 |
</li> |
|
| 45 |
|
|
| 46 |
<% end %> |
|
| 47 |
</ul> |
|
| 48 |
<% end %> |
|
| app/views/activities/_busy_institution.html.erb | ||
|---|---|---|
| 1 |
<% events = @events_by_day %> |
|
| 2 |
<% if (events.nil?) |
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current) |
|
| 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
|
| 5 |
end |
|
| 6 |
%> |
|
| 7 |
|
|
| 8 |
<% if events.empty? %> |
|
| 9 |
|
|
| 10 |
<% else %> |
|
| 11 |
|
|
| 12 |
<ul> |
|
| 13 |
|
|
| 14 |
<% |
|
| 15 |
for institution in busy_institutions(events, 5) |
|
| 16 |
%> |
|
| 17 |
|
|
| 18 |
<li class="busy"> |
|
| 19 |
<span class="title"> |
|
| 20 |
<%= link_to h(institution), { :controller => 'activities', :institution => institution } %>
|
|
| 21 |
</span> |
|
| 22 |
</li> |
|
| 23 |
|
|
| 24 |
<% end %> |
|
| 25 |
</ul> |
|
| 26 |
<% end %> |
|
| app/views/activities/index.html.erb | ||
|---|---|---|
| 1 |
<h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2> |
|
| 1 |
<h2><%= |
|
| 2 |
if @author.nil? |
|
| 3 |
if @institution_name.blank? |
|
| 4 |
l(:label_activity) |
|
| 5 |
else |
|
| 6 |
l(:label_institution_activity, h(@institution_name)) |
|
| 7 |
end |
|
| 8 |
else |
|
| 9 |
l(:label_user_activity, link_to_user(@author)) |
|
| 10 |
end |
|
| 11 |
%></h2> |
|
| 2 | 12 |
<p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p> |
| 3 | 13 |
|
| 4 | 14 |
<div id="activity"> |
| app/views/attachments/_form.html.erb | ||
|---|---|---|
| 2 | 2 |
<span> |
| 3 | 3 |
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil, :class => 'file', |
| 4 | 4 |
:onchange => "checkFileSize(this, #{Setting.attachment_max_size.to_i.kilobytes}, '#{escape_javascript(l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)))}');" -%>
|
| 5 |
<label class="inline"><%= l(:label_optional_description) %><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil, :class => 'description' %></label> |
|
| 6 |
<%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %>
|
|
| 5 |
<nobr><label class="inline"><%= l(:label_optional_description) %><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil, :class => 'description' %></label>
|
|
| 6 |
<%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %></nobr>
|
|
| 7 | 7 |
</span> |
| 8 | 8 |
</span> |
| 9 |
<small><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %> |
|
| 9 |
<br><small><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %>
|
|
| 10 | 10 |
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) |
| 11 | 11 |
</small> |
| app/views/attachments/_links.html.erb | ||
|---|---|---|
| 2 | 2 |
<% for attachment in attachments %> |
| 3 | 3 |
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> |
| 4 | 4 |
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
| 5 |
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
|
| 5 |
<span class="size_and_count"><%= number_to_human_size attachment.filesize %><%= ", " + l(:label_x_downloads, :count => attachment.downloads) unless attachment.downloads == 0 %></span>
|
|
| 6 | 6 |
<% if options[:deletable] %> |
| 7 | 7 |
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
| 8 | 8 |
:confirm => l(:text_are_you_sure), |
| app/views/projects/_latest.html.erb | ||
|---|---|---|
| 1 |
<ul> |
|
| 2 |
<% for project in Project.latest(User.current) %> |
|
| 3 |
<li class="latest"> |
|
| 4 |
<span class="title"> |
|
| 5 |
<% if !project.root? %> |
|
| 6 |
<% project.ancestors.each do |p| %> |
|
| 7 |
<%= h(p) %> » |
|
| 8 |
<% end %> |
|
| 9 |
<% end %> |
|
| 10 |
<%= link_to_project project %> |
|
| 11 |
</span> |
|
| 12 |
<% if !project.is_public? %> |
|
| 13 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 14 |
<% end %> |
|
| 15 |
<span class="time"><%= format_time(project.created_on)%></span> |
|
| 16 |
<%= render_project_short_description project %> |
|
| 17 |
</li> |
|
| 18 |
<% end %> |
|
| 19 |
</ul> |
|
| app/views/projects/explore.html.erb | ||
|---|---|---|
| 1 |
|
|
| 2 |
<h2><%= l(:label_explore_projects) %></h2> |
|
| 3 |
|
|
| 4 |
<div class="tags box"> |
|
| 5 |
<h3><%=l(:label_project_tags_all)%></h3> |
|
| 6 |
<%= render :partial => 'projects/tagcloud' %> |
|
| 7 |
</div> |
|
| 8 |
<div class="splitcontentleft"> |
|
| 9 |
<div class="institutions box"> |
|
| 10 |
<h3><%=l(:label_institutions_busy)%></h3> |
|
| 11 |
<%= render :partial => 'activities/busy_institution' %> |
|
| 12 |
</div> |
|
| 13 |
<div class="projects box"> |
|
| 14 |
<h3><%=l(:label_project_latest)%></h3> |
|
| 15 |
<%= render :partial => 'projects/latest' %> |
|
| 16 |
</div> |
|
| 17 |
</div> |
|
| 18 |
<div class="splitcontentright"> |
|
| 19 |
<div class="projects box"> |
|
| 20 |
<h3><%=l(:label_projects_busy)%></h3> |
|
| 21 |
<%= render :partial => 'activities/busy' %> |
|
| 22 |
</div> |
|
| 23 |
</div> |
|
| app/views/welcome/index.html.erb | ||
|---|---|---|
| 14 | 14 |
|
| 15 | 15 |
<div class="splitcontentright"> |
| 16 | 16 |
<% if @site_news.any? %> |
| 17 |
<div class="news box"> |
|
| 18 |
<h3><%=l(:label_news_site_latest)%></h3>
|
|
| 17 |
<div class="news box">
|
|
| 18 |
<h3><%=l(:label_news_site_latest)%></h3>
|
|
| 19 | 19 |
<%= render :partial => 'news/news', :locals => { :project => @site_project }, :collection => @site_news %>
|
| 20 |
|
|
| 21 | 20 |
<%= link_to l(:label_news_more), { :controller => 'projects', :action => @site_project.identifier, :id => 'news' } %>
|
| 22 | 21 |
</div> |
| 23 | 22 |
<% end %> |
| 24 |
<% if @projects.any? %> |
|
| 25 | 23 |
<div class="projects box"> |
| 26 | 24 |
<h3><%=l(:label_project_latest)%></h3> |
| 27 |
<ul> |
|
| 28 |
<% for project in @projects %> |
|
| 29 |
<% @project = project %> |
|
| 30 |
<li class="latest"> |
|
| 31 |
<span class="title"> |
|
| 32 |
<% if !project.root? %> |
|
| 33 |
<% project.ancestors.each do |p| %> |
|
| 34 |
<%= h(p) %> » |
|
| 35 |
<% end %> |
|
| 36 |
<% end %> |
|
| 37 |
<%= link_to_project project %> |
|
| 38 |
</span> |
|
| 39 |
<% if !project.is_public? %> |
|
| 40 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 41 |
<% end %> |
|
| 42 |
<span class="time"><%= format_time(project.created_on)%></span> |
|
| 43 |
<%= render_project_short_description project %> |
|
| 44 |
</li> |
|
| 45 |
<% end %> |
|
| 46 |
<% @project = nil %> |
|
| 47 |
</ul> |
|
| 48 |
<%= link_to l(:label_projects_more), :controller => 'projects' %> |
|
| 25 |
<%= render :partial => 'projects/latest' %> |
|
| 26 |
<%= link_to l(:label_projects_more), :controller => 'projects' %> |
|
| 49 | 27 |
</div> |
| 50 |
<% end %> |
|
| 51 | 28 |
<%= call_hook(:view_welcome_index_right, :projects => @projects) %> |
| 52 | 29 |
</div> |
| 53 | 30 |
|
| config/locales/en.yml | ||
|---|---|---|
| 487 | 487 |
zero: no projects |
| 488 | 488 |
one: 1 project |
| 489 | 489 |
other: "%{count} projects"
|
| 490 |
label_x_downloads: |
|
| 491 |
zero: never downloaded |
|
| 492 |
one: downloaded once |
|
| 493 |
other: "downloaded %{count} times"
|
|
| 490 | 494 |
label_project_all: All Projects |
| 491 | 495 |
label_project_latest: Latest projects |
| 492 | 496 |
label_projects_more: More projects |
| 497 |
label_project_tags_all: Popular tags |
|
| 498 |
label_projects_busy: Busy projects |
|
| 499 |
label_institutions_busy: Active institutions |
|
| 493 | 500 |
label_managers: Managed by |
| 494 | 501 |
label_issue: Issue |
| 495 | 502 |
label_issue_new: New issue |
| ... | ... | |
| 556 | 563 |
label_activity_my_recent_none: No recent activity |
| 557 | 564 |
label_overall_activity: Overall activity |
| 558 | 565 |
label_user_activity: "%{value}'s activity"
|
| 566 |
label_institution_activity: "Activity from %{value}"
|
|
| 559 | 567 |
label_new: New |
| 560 | 568 |
label_logged_as: Logged in as |
| 561 | 569 |
label_environment: Environment |
| ... | ... | |
| 685 | 693 |
label_repository: Repository |
| 686 | 694 |
label_is_external_repository: Track an external repository |
| 687 | 695 |
label_repository_plural: Repositories |
| 688 |
label_browse: Browse
|
|
| 696 |
label_explore_projects: Explore projects
|
|
| 689 | 697 |
label_modification: "%{count} change"
|
| 690 | 698 |
label_modification_plural: "%{count} changes"
|
| 691 | 699 |
label_branch: Branch |
| config/routes.rb | ||
|---|---|---|
| 32 | 32 |
# TODO: wasteful since this is also nested under issues, projects, and projects/issues |
| 33 | 33 |
map.resources :time_entries, :controller => 'timelog' |
| 34 | 34 |
|
| 35 |
map.connect 'explore', :controller => 'projects', :action => 'explore' |
|
| 36 |
|
|
| 35 | 37 |
map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post}
|
| 36 | 38 |
map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get}
|
| 37 | 39 |
map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post}
|
| extra/soundsoftware/extract-javadoc.sh | ||
|---|---|---|
| 35 | 35 |
# package declarations |
| 36 | 36 |
|
| 37 | 37 |
find "$projectdir" -type f -name \*.java \ |
| 38 |
-exec grep '^ *package [a-zA-Z][a-zA-Z0-9\._-]*; *$' \{\} /dev/null \; |
|
|
| 39 |
sed -e 's/\/[^\/]*: *package */:/' -e 's/; *$//' |
|
|
| 38 |
-exec egrep '^ *package +[a-zA-Z][a-zA-Z0-9\._-]*;.*$' \{\} /dev/null \; |
|
|
| 39 |
sed -e 's/\/[^\/]*: *package */:/' -e 's/;.*$//' |
|
|
| 40 | 40 |
sort | uniq | ( |
| 41 | 41 |
current_prefix= |
| 42 | 42 |
current_packages= |
| extra/soundsoftware/get-apache-log-stats.rb | ||
|---|---|---|
| 1 |
|
|
| 2 |
# Read an Apache log file in SoundSoftware site format from stdin and |
|
| 3 |
# produce some per-project stats. |
|
| 4 |
# |
|
| 5 |
# Invoke with e.g. |
|
| 6 |
# |
|
| 7 |
# cat /var/log/apache2/code-access.log | \ |
|
| 8 |
# script/runner -e production extra/soundsoftware/get-apache-log-stats.rb |
|
| 9 |
|
|
| 10 |
|
|
| 11 |
# Use the ApacheLogRegex parser, a neat thing |
|
| 12 |
# See http://www.simonecarletti.com/blog/2009/02/apache-log-regex-a-lightweight-ruby-apache-log-parser/ |
|
| 13 |
require 'apachelogregex' |
|
| 14 |
|
|
| 15 |
# This is the format defined in our httpd.conf |
|
| 16 |
vhost_combined_format = '%v:%p %h %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"'
|
|
| 17 |
|
|
| 18 |
parser = ApacheLogRegex.new(vhost_combined_format) |
|
| 19 |
|
|
| 20 |
# project name -> count of hg clones |
|
| 21 |
clones = Hash.new(0) |
|
| 22 |
|
|
| 23 |
# project name -> count of hg pulls |
|
| 24 |
pulls = Hash.new(0) |
|
| 25 |
|
|
| 26 |
# project name -> count of hg pushes |
|
| 27 |
pushes = Hash.new(0) |
|
| 28 |
|
|
| 29 |
# project name -> count of hg archive requests (i.e. Download as Zip) |
|
| 30 |
zips = Hash.new(0) |
|
| 31 |
|
|
| 32 |
# project name -> count of hits to pages under /projects/projectname |
|
| 33 |
hits = Hash.new(0) |
|
| 34 |
|
|
| 35 |
# project name -> Project object |
|
| 36 |
@projects = Hash.new |
|
| 37 |
|
|
| 38 |
parseable = 0 |
|
| 39 |
unparseable = 0 |
|
| 40 |
|
|
| 41 |
def is_public_project?(project) |
|
| 42 |
if !project |
|
| 43 |
false |
|
| 44 |
elsif project =~ /^\d+$/ |
|
| 45 |
# ignore numerical project ids, they are only used when editing projects |
|
| 46 |
false |
|
| 47 |
elsif @projects.key?(project) |
|
| 48 |
@projects[project].is_public? |
|
| 49 |
else |
|
| 50 |
pobj = Project.find_by_identifier(project) |
|
| 51 |
if pobj |
|
| 52 |
@projects[project] = pobj |
|
| 53 |
pobj.is_public? |
|
| 54 |
else |
|
| 55 |
print "Project not found: ", project, "\n" |
|
| 56 |
false |
|
| 57 |
end |
|
| 58 |
end |
|
| 59 |
end |
|
| 60 |
|
|
| 61 |
def print_stats(h) |
|
| 62 |
h.keys.sort { |a,b| h[b] <=> h[a] }.each do |p|
|
|
| 63 |
if h[p] > 0 |
|
| 64 |
print h[p], " ", @projects[p].name, " [", p, "]\n" |
|
| 65 |
end |
|
| 66 |
end |
|
| 67 |
end |
|
| 68 |
|
|
| 69 |
STDIN.each do |line| |
|
| 70 |
|
|
| 71 |
record = parser.parse(line) |
|
| 72 |
|
|
| 73 |
# most annoyingly, the parser can't handle the comma-separated list |
|
| 74 |
# in X-Forwarded-For where it has more than one element. If it has |
|
| 75 |
# failed, remove any IP addresses or the word "unknown" with |
|
| 76 |
# trailing commas and try again |
|
| 77 |
if not record |
|
| 78 |
filtered = line.gsub(/(unknown|([0-9]+\.){3}[0-9]+),\s*/, "")
|
|
| 79 |
record = parser.parse(filtered) |
|
| 80 |
end |
|
| 81 |
|
|
| 82 |
# discard, but count, unparseable lines |
|
| 83 |
if not record |
|
| 84 |
print "Line not parseable: ", line, "\n" |
|
| 85 |
unparseable += 1 |
|
| 86 |
next |
|
| 87 |
end |
|
| 88 |
|
|
| 89 |
# discard everything that isn't a 200 OK response |
|
| 90 |
next if record["%>s"] != "200" |
|
| 91 |
|
|
| 92 |
# discard anything apparently requested by a crawler |
|
| 93 |
next if record["%{User-Agent}i"] =~ /(bot|slurp|crawler|spider|Redmine)\b/i
|
|
| 94 |
|
|
| 95 |
# pull out request e.g. GET / HTTP/1.0 |
|
| 96 |
request = record["%r"] |
|
| 97 |
|
|
| 98 |
# split into method, path, protocol |
|
| 99 |
if not request =~ /^[^\s]+ ([^\s]+) [^\s]+$/ |
|
| 100 |
print "Line not parseable (bad method, path, protocol): ", line, "\n" |
|
| 101 |
unparseable += 1 |
|
| 102 |
next |
|
| 103 |
end |
|
| 104 |
|
|
| 105 |
# get the path e.g. /projects/weevilmatic and split on / |
|
| 106 |
path = $~[1] |
|
| 107 |
components = path.split("/")
|
|
| 108 |
|
|
| 109 |
# should have at least two elements unless path is "/"; first should |
|
| 110 |
# be empty (begins with /) |
|
| 111 |
if path != "/" and (components.size < 2 or components[0] != "") |
|
| 112 |
print "Line not parseable (degenerate path): ", line, "\n" |
|
| 113 |
unparseable += 1 |
|
| 114 |
next |
|
| 115 |
end |
|
| 116 |
|
|
| 117 |
if components[1] == "hg" |
|
| 118 |
|
|
| 119 |
# path is /hg/project?something or /hg/project/something |
|
| 120 |
|
|
| 121 |
project = components[2].split("?")[0]
|
|
| 122 |
if not is_public_project?(project) |
|
| 123 |
next |
|
| 124 |
end |
|
| 125 |
|
|
| 126 |
if components[2] =~ /&roots=00*$/ |
|
| 127 |
clones[project] += 1 |
|
| 128 |
elsif components[2] =~ /cmd=capabilities/ |
|
| 129 |
pulls[project] += 1 |
|
| 130 |
elsif components[2] =~ /cmd=unbundle/ |
|
| 131 |
pushes[project] += 1 |
|
| 132 |
elsif components[3] == "archive" |
|
| 133 |
zips[project] += 1 |
|
| 134 |
end |
|
| 135 |
|
|
| 136 |
elsif components[1] == "projects" |
|
| 137 |
|
|
| 138 |
# path is /projects/project or /projects/project/something |
|
| 139 |
|
|
| 140 |
project = components[2] |
|
| 141 |
project = project.split("?")[0] if project
|
|
| 142 |
if not is_public_project?(project) |
|
| 143 |
next |
|
| 144 |
end |
|
| 145 |
|
|
| 146 |
hits[project] += 1 |
|
| 147 |
|
|
| 148 |
end |
|
| 149 |
|
|
| 150 |
parseable += 1 |
|
| 151 |
end |
|
| 152 |
|
|
| 153 |
# Each clone is also a pull; deduct it from the pulls hash, because we |
|
| 154 |
# want that to contain only non-clone pulls |
|
| 155 |
|
|
| 156 |
clones.keys.each do |project| |
|
| 157 |
pulls[project] -= 1 |
|
| 158 |
end |
|
| 159 |
|
|
| 160 |
print parseable, " parseable\n" |
|
| 161 |
print unparseable, " unparseable\n" |
|
| 162 |
|
|
| 163 |
|
|
| 164 |
print "\nMercurial clones:\n" |
|
| 165 |
print_stats clones |
|
| 166 |
|
|
| 167 |
print "\nMercurial pulls (excluding clones):\n" |
|
| 168 |
print_stats pulls |
|
| 169 |
|
|
| 170 |
print "\nMercurial pushes:\n" |
|
| 171 |
print_stats pushes |
|
| 172 |
|
|
| 173 |
print "\nMercurial archive (zip file) downloads:\n" |
|
| 174 |
print_stats zips |
|
| 175 |
|
|
| 176 |
print "\nProject page hits (excluding crawlers):\n" |
|
| 177 |
print_stats hits |
|
| 178 |
|
|
| 179 |
|
|
| extra/soundsoftware/get-statistics.rb | ||
|---|---|---|
| 1 |
# this script will get stats from the repo and print them to stdout |
|
| 2 |
|
|
| 3 |
# USAGE: |
|
| 4 |
|
|
| 5 |
# ./script/runner -e production extra/soundsoftware/get-statistics.rb |
|
| 6 |
# |
|
| 7 |
|
|
| 8 |
d1 = Date.parse("20100701") # => 1 Jul 2010
|
|
| 9 |
d2 = Date.today |
|
| 10 |
|
|
| 11 |
def delta_array (iarray) |
|
| 12 |
# returns an array with the deltas |
|
| 13 |
## prepends a zero and drops the last element |
|
| 14 |
deltas = [0] + iarray |
|
| 15 |
deltas = deltas.first(deltas.size - 1) |
|
| 16 |
|
|
| 17 |
return iarray.zip(deltas).map { |x, y| x - y }
|
|
| 18 |
|
|
| 19 |
end |
|
| 20 |
|
|
| 21 |
def months_between(d1, d2) |
|
| 22 |
months = [] |
|
| 23 |
start_date = Date.civil(d1.year, d1.month, 1) |
|
| 24 |
end_date = Date.civil(d2.year, d2.month, 1) |
|
| 25 |
|
|
| 26 |
raise ArgumentError unless d1 <= d2 |
|
| 27 |
|
|
| 28 |
while (start_date < end_date) |
|
| 29 |
months << start_date |
|
| 30 |
start_date = start_date >>1 |
|
| 31 |
end |
|
| 32 |
|
|
| 33 |
months << end_date |
|
| 34 |
end |
|
| 35 |
|
|
| 36 |
def weeks_between(d1, d2) |
|
| 37 |
weeks = [] |
|
| 38 |
start_date = Date.civil(d1.year, d1.month, d1.day) |
|
| 39 |
end_date = Date.civil(d2.year, d2.month, d2.day) |
|
| 40 |
|
|
| 41 |
raise ArgumentError unless d1 <= d2 |
|
| 42 |
|
|
| 43 |
while (start_date < end_date) |
|
| 44 |
weeks << start_date |
|
| 45 |
start_date = start_date + 2.week |
|
| 46 |
end |
|
| 47 |
|
|
| 48 |
weeks << end_date |
|
| 49 |
end |
|
| 50 |
|
|
| 51 |
def get_user_project_evol_stats() |
|
| 52 |
# dates = months_between(d1, d2) |
|
| 53 |
dates = months_between(d1, d2) |
|
| 54 |
|
|
| 55 |
# number of users |
|
| 56 |
n_users = [] |
|
| 57 |
n_projects = [] |
|
| 58 |
qm_users = [] |
|
| 59 |
|
|
| 60 |
dates.each do |date| |
|
| 61 |
users = User.find_by_sql ["SELECT * FROM users WHERE users.status = '1' AND users.created_on <= ?;", date] |
|
| 62 |
projects = Project.find_by_sql ["SELECT * FROM projects WHERE projects.created_on <= ?;", date] |
|
| 63 |
|
|
| 64 |
qm_users_list = User.find_by_sql ["SELECT * FROM users,ssamr_user_details WHERE users.status = '1' AND ssamr_user_details.user_id = users.id AND (users.mail like '%qmul%' OR ssamr_user_details.institution_id = '99') AND users.created_on <= ?;", date ] |
|
| 65 |
|
|
| 66 |
qm_users << qm_users_list.count |
|
| 67 |
n_users << users.count |
|
| 68 |
n_projects << projects.count |
|
| 69 |
|
|
| 70 |
# private_projects = Project.find(:all, :conditions => {:created_on => d1..date, is_public => false})
|
|
| 71 |
end |
|
| 72 |
|
|
| 73 |
user_deltas = delta_array(n_users) |
|
| 74 |
proj_deltas = delta_array(n_projects) |
|
| 75 |
qm_user_deltas = delta_array(qm_users) |
|
| 76 |
|
|
| 77 |
puts "Date Users D_Users QM_Users D_QM_users Projects D_Projects" |
|
| 78 |
|
|
| 79 |
dates.zip(n_users, user_deltas, qm_users, qm_user_deltas, n_projects, proj_deltas).each do |a, b, c, d, e, f, g| |
|
| 80 |
puts "#{a} #{b} #{c} #{d} #{e} #{f} #{g}"
|
|
| 81 |
end |
|
| 82 |
|
|
| 83 |
end |
|
| 84 |
|
|
| 85 |
|
|
| 86 |
def get_project_status() |
|
| 87 |
date = "20121101" |
|
| 88 |
|
|
| 89 |
all_projects = Project.find(:all, :conditions => ["created_on < ?", date]) |
|
| 90 |
# all_projects = Project.find(:all, :conditions => ["is_public = ? AND created_on < ?", true, date]) |
|
| 91 |
# all_projects = Project.find(:all, :conditions => ["is_public = ? AND created_on < ?", false, date]) |
|
| 92 |
|
|
| 93 |
collab = [] |
|
| 94 |
users_per_proj = [] |
|
| 95 |
|
|
| 96 |
# puts "Public Users Institutions" |
|
| 97 |
|
|
| 98 |
all_projects.each do |proj| |
|
| 99 |
insts = [] |
|
| 100 |
|
|
| 101 |
proj.users.each do |u| |
|
| 102 |
if u.institution == "" || u.institution == "No Institution Set" |
|
| 103 |
if u.mail.include?("qmul.ac.uk") || u.mail.include?("andrewrobertson77")
|
|
| 104 |
insts << "Queen Mary, University of London" |
|
| 105 |
else |
|
| 106 |
insts << u.mail |
|
| 107 |
end |
|
| 108 |
else |
|
| 109 |
insts << u.institution |
|
| 110 |
end |
|
| 111 |
end |
|
| 112 |
|
|
| 113 |
users_per_proj << proj.users.count |
|
| 114 |
collab << insts.uniq.count |
|
| 115 |
end |
|
| 116 |
|
|
| 117 |
|
|
| 118 |
# freq = collab.inject(Hash.new(0)) { |h,v| h[v] += 1; h }
|
|
| 119 |
# freq = freq.sort_by {|key, value| value}
|
|
| 120 |
# puts freq.inspect.sort |
|
| 121 |
|
|
| 122 |
puts "Projects: #{all_projects.count} UpP: #{users_per_proj.sum / users_per_proj.size.to_f} Users1+: #{users_per_proj.count{|x| x> 1}} Users2+: #{users_per_proj.count{|x| x> 2}} Collab1+: #{collab.count{|x| x > 1}} Collab2+: #{collab.count{|x| x > 2}} IpP: #{collab.sum / collab.size.to_f}"
|
|
| 123 |
end |
|
| 124 |
|
|
| 125 |
def get_user_projects_ratios() |
|
| 126 |
user_projects = User.find(:all, :conditions=> {:status => 1})
|
|
| 127 |
pub_proj_user = user_projects.map{|u| u.projects.find(:all, :conditions=>{:is_public => true}).count}
|
|
| 128 |
|
|
| 129 |
user_projects.zip(pub_proj_user).each do |u, pub| |
|
| 130 |
puts "#{u.projects.count} #{pub}"
|
|
| 131 |
end |
|
| 132 |
|
|
| 133 |
end |
|
| 134 |
|
|
| 135 |
def get_inst_list() |
|
| 136 |
users = User.find(:all, :conditions => {:status => 1})
|
|
| 137 |
inst_list = users.map{|user| user.institution}
|
|
| 138 |
|
|
| 139 |
freq = inst_list.inject(Hash.new(0)) { |h,v| h[v] += 1; h }
|
|
| 140 |
|
|
| 141 |
end |
|
| 142 |
|
|
| 143 |
|
|
| 144 |
# get_user_projects_ratios() |
|
| 145 |
# get_user_project_evol_stats() |
|
| 146 |
|
|
| 147 |
get_project_status() |
|
| public/help/wiki_syntax.html | ||
|---|---|---|
| 44 | 44 |
<tr><th><img src="../images/jstoolbar/bt_h2.png" style="border: 1px solid #bbb;" alt="Heading 2" /></th><td>h2. Title 2</td><td><h2>Title 2</h2></td></tr> |
| 45 | 45 |
<tr><th><img src="../images/jstoolbar/bt_h3.png" style="border: 1px solid #bbb;" alt="Heading 3" /></th><td>h3. Title 3</td><td><h3>Title 3</h3></td></tr> |
| 46 | 46 |
|
| 47 |
<tr><th colspan="3">Table of contents</th></tr> |
|
| 48 |
<tr><th></th><td><pre>{{toc}}</pre></td><td>Left-aligned table of contents</td></tr>
|
|
| 49 |
<tr><th></th><td><pre>{{>toc}}</pre></td><td>Right-aligned table of contents</td></tr>
|
|
| 50 |
|
|
| 47 | 51 |
<tr><th colspan="3">Links</th></tr> |
| 48 | 52 |
<tr><th></th><td>http://foo.bar</td><td><a href="#">http://foo.bar</a></td></tr> |
| 49 | 53 |
<tr><th></th><td>"Foo":http://foo.bar</td><td><a href="#">Foo</a></td></tr> |
| 50 | 54 |
|
| 51 |
<tr><th colspan="3">Redmine links</th></tr>
|
|
| 55 |
<tr><th colspan="3">Magic links</th></tr>
|
|
| 52 | 56 |
<tr><th><img src="../images/jstoolbar/bt_link.png" style="border: 1px solid #bbb;" alt="Link to a Wiki page" /></th><td>[[Wiki page]]</td><td><a href="#">Wiki page</a></td></tr> |
| 53 | 57 |
<tr><th></th><td>Issue #12</td><td>Issue <a href="#">#12</a></td></tr> |
| 54 | 58 |
<tr><th></th><td>Revision r43</td><td>Revision <a href="#">r43</a></td></tr> |
| public/stylesheets/application.css | ||
|---|---|---|
| 5 | 5 |
h1 {margin:0; padding:0; font-size: 24px;}
|
| 6 | 6 |
h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
|
| 7 | 7 |
h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
|
| 8 |
h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
|
|
| 8 |
h4, .wiki h3 {font-size: 14px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
|
|
| 9 | 9 |
|
| 10 | 10 |
/***** Layout *****/ |
| 11 | 11 |
#wrapper {background: white;}
|
| ... | ... | |
| 24 | 24 |
|
| 25 | 25 |
#account {float:right;}
|
| 26 | 26 |
|
| 27 |
#header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
|
|
| 27 |
#header {height:68px;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
|
|
| 28 | 28 |
#header a {color:#f8f8f8;}
|
| 29 | 29 |
#header h1 a.ancestor { font-size: 80%; }
|
| 30 | 30 |
|
| 31 | 31 |
#project-search-jump {float:right; }
|
| 32 | 32 |
|
| 33 | 33 |
|
| 34 |
#main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
|
|
| 34 |
#main-menu {position: absolute; bottom: 0px; left:8px; margin-right: -500px;}
|
|
| 35 | 35 |
#main-menu ul {margin: 0; padding: 0;}
|
| 36 | 36 |
#main-menu li {
|
| 37 | 37 |
float:left; |
| ... | ... | |
| 240 | 240 |
div.members h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; }
|
| 241 | 241 |
div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left: 20px; }
|
| 242 | 242 |
div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }
|
| 243 |
div.tags h3 { background: url(../images/ticket_note.png) no-repeat 0% 50%; padding-left: 20px; }
|
|
| 244 |
div.institutions h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; }
|
|
| 243 | 245 |
|
| 244 | 246 |
#watchers ul {margin: 0; padding: 0;}
|
| 245 | 247 |
#watchers li {list-style-type:none;margin: 0px 2px 0px 0px; padding: 0px 0px 0px 0px;}
|
| ... | ... | |
| 500 | 502 |
.summary {font-style: italic;}
|
| 501 | 503 |
|
| 502 | 504 |
#attachments_fields input[type=text] {margin-left: 8px; }
|
| 503 |
#attachments_fields span {display:block; white-space:nowrap;}
|
|
| 505 |
/*#attachments_fields span {display:block; white-space:nowrap;} */
|
|
| 504 | 506 |
#attachments_fields img {vertical-align: middle;}
|
| 505 | 507 |
|
| 506 | 508 |
div.attachments { margin-top: 12px; }
|
| 507 | 509 |
div.attachments p { margin:4px 0 2px 0; }
|
| 508 | 510 |
div.attachments img { vertical-align: middle; }
|
| 509 |
div.attachments span.author { font-size: 0.9em; color: #888; }
|
|
| 511 |
div.attachments span.author { font-size: 0.9em; color: #888; font-style: italic; padding-left: 4px }
|
|
| 512 |
div.attachments span.size_and_count { font-size: 0.9em; color: #888; padding-left: 4px; }
|
|
| 510 | 513 |
|
| 511 | 514 |
p.other-formats { text-align: right; font-size:0.9em; color: #666; }
|
| 512 | 515 |
.other-formats span + span:before { content: "| "; }
|
| public/themes/soundsoftware/stylesheets/application.css | ||
|---|---|---|
| 34 | 34 |
|
| 35 | 35 |
h2,h3,h4,.wiki h1 {
|
| 36 | 36 |
color: #3e442c; |
| 37 |
font-weight: bold;
|
|
| 37 |
/* font-weight: bold; */
|
|
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 | 40 |
.wiki h2,.wiki h3,.wiki h4 {
|
| ... | ... | |
| 119 | 119 |
#quick-search { margin-right: 6px; margin-top: 1em; color: #000; }
|
| 120 | 120 |
#project-jump-box { float: right; margin-right: 6px; margin-top: 5px; color: #000; }
|
| 121 | 121 |
#project-ancestors-title {
|
| 122 |
margin-bottom: 0px;
|
|
| 122 |
margin-bottom: -6px;
|
|
| 123 | 123 |
margin-left: 12px; |
| 124 | 124 |
margin-top: 6px; |
| 125 | 125 |
} |
| 126 | 126 |
|
| 127 |
#main-menu { position: absolute; top: 100px; /* background-color: #be5700; */ left: 0; border-top: 0; width: 100%;/* height: 1.82em; */ padding: 0; margin: 0; border: 0; }
|
|
| 127 |
#main-menu { position: absolute; top: 100px; /* background-color: #be5700; */ left: 2px; border-top: 0; width: 100%;/* height: 1.82em; */ padding: 0; margin: 0; border: 0; }
|
|
| 128 | 128 |
#main-menu li { margin: 0; padding: 0; }
|
| 129 |
#main-menu li a { background-color: #fdfbf5; color: #be5700; border-right: 1px solid #a9b680; font-size: 97%; padding: 0em 8px 0.2em 10px; font-weight: normal; }
|
|
| 129 |
#main-menu li a { background-color: #fdfbf5; color: #be5700; border-right: 1px solid #a9b680; font-size: 97%; padding: 0em 8px 0em 10px; font-weight: normal; }
|
|
| 130 | 130 |
#main-menu li:last-child a { border-right: 0; }
|
| 131 | 131 |
#main-menu li a:hover { background-color: #fdfbf5; color: #be5700; text-decoration: underline; }
|
| 132 | 132 |
#main-menu li a.selected, #main-menu li a.selected:hover { background-color: #fdfbf5; color: #3e442c; }
|
| ... | ... | |
| 145 | 145 |
h2, h3, h4, .wiki h1, .wiki h2, .wiki h3 { border-bottom: 0px; }
|
| 146 | 146 |
/*h2, .wiki h1 { letter-spacing:-1px; }
|
| 147 | 147 |
*/ |
| 148 |
h4 { border-bottom: dotted 1px #c0c0c0; }
|
|
| 148 |
/* h4 { border-bottom: dotted 1px #c0c0c0; } */
|
|
| 149 |
|
|
| 150 |
.wiki p { margin-left: 3em; margin-right: 3em; }
|
|
| 149 | 151 |
|
| 150 | 152 |
div.issue { background: #fdfaf0; border: 1px solid #a9b680; border-left: 4px solid #a9b680; }
|
| 151 | 153 |
|
| public/themes/soundsoftware/stylesheets/fonts-generic.css | ||
|---|---|---|
| 1 | 1 |
@import url(fonts.css); |
| 2 | 2 |
|
| 3 |
h1, #project-ancestors-title {
|
|
| 4 |
font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif;
|
|
| 5 |
font-weight: normal;
|
|
| 3 |
h1, #project-ancestors-title, #top-menu a {
|
|
| 4 |
font-family: Insider, 'Gill Sans', Tahoma, sans-serif;
|
|
| 5 |
font-weight: bold;
|
|
| 6 | 6 |
} |
| 7 | 7 |
|
| 8 |
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 {
|
|
| 9 |
font-family: DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; |
|
| 8 |
#top-menu div, #top-menu li {
|
|
| 9 |
font-size: 12px; |
|
| 10 |
} |
|
| 11 |
|
|
| 12 |
body,p,li,table {
|
|
| 13 |
font-family: Insider, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; |
|
| 14 |
font-size: 14px; |
|
| 15 |
line-height: 1.34; |
|
| 16 |
font-weight: normal; |
|
| 17 |
} |
|
| 18 |
|
|
| 19 |
h2,h3,h4,.wiki h1,.embedded h1 {
|
|
| 20 |
font-family: Insider, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; |
|
| 21 |
font-weight: bold; |
|
| 10 | 22 |
line-height: 1.34; |
| 11 | 23 |
} |
| 12 | 24 |
|
| public/themes/soundsoftware/stylesheets/fonts-mac.css | ||
|---|---|---|
| 1 | 1 |
@import url(fonts.css); |
| 2 | 2 |
|
| 3 |
h1, #project-ancestors-title {
|
|
| 4 |
font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif;
|
|
| 5 |
font-weight: normal;
|
|
| 3 |
h1, #project-ancestors-title, #top-menu a {
|
|
| 4 |
font-family: Insider, "Lucida Grande", sans-serif;
|
|
| 5 |
font-weight: bold;
|
|
| 6 | 6 |
} |
| 7 | 7 |
|
| 8 |
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 {
|
|
| 9 |
font-family: 'Lucida Grande', 'Lucida Sans Unicode', DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; |
|
| 8 |
#top-menu div, #top-menu li {
|
|
| 9 |
font-size: 12px; |
|
| 10 |
} |
|
| 11 |
|
|
| 12 |
body,p,li,table {
|
|
| 13 |
font-family: Insider, "Lucida Grande", sans-serif; |
|
| 14 |
font-size: 14px; |
|
| 15 |
line-height: 1.34; |
|
| 16 |
font-weight: normal; |
|
| 17 |
} |
|
| 18 |
|
|
| 19 |
h2,h3,h4,.wiki h1,.embedded h1 {
|
|
| 20 |
font-family: Insider, "Lucida Grande", sans-serif; |
|
| 21 |
font-weight: bold; |
|
| 10 | 22 |
line-height: 1.34; |
| 11 | 23 |
} |
| 24 |
|
|
| public/themes/soundsoftware/stylesheets/fonts-ms.css | ||
|---|---|---|
| 1 | 1 |
@import url(fonts.css); |
| 2 | 2 |
|
| 3 |
h1, #project-ancestors-title {
|
|
| 4 |
font-family: GilliusADFNo2, 'Gill Sans', Tahoma, sans-serif; |
|
| 3 |
/* IE likes us to separate out normal & bold into different fonts |
|
| 4 |
rather than use the selectors on the same font */ |
|
| 5 |
|
|
| 6 |
h1, #project-ancestors-title, #top-menu a {
|
|
| 7 |
font-family: Insider-Medium, Tahoma, sans-serif; |
|
| 5 | 8 |
font-weight: normal; |
| 6 | 9 |
} |
| 7 | 10 |
|
| 8 |
body,p,h2,h3,h4,li,table,.wiki h1,.embedded h1 {
|
|
| 9 |
font-family: Calibri, DroidSans, 'Liberation Sans', tahoma, verdana, sans-serif; |
|
| 11 |
#top-menu div, #top-menu li {
|
|
| 12 |
font-size: 12px; |
|
| 13 |
} |
|
| 14 |
|
|
| 15 |
body,p,li,table {
|
|
| 16 |
font-family: Insider-Regular, tahoma, verdana, sans-serif; |
|
| 17 |
font-size: 14px; |
|
| 18 |
line-height: 1.34; |
|
| 19 |
font-weight: normal; |
|
| 20 |
} |
|
| 21 |
|
|
| 22 |
h2,h3,h4,.wiki h1,.embedded h1 {
|
|
| 23 |
font-family: Insider-Medium, tahoma, verdana, sans-serif; |
|
| 24 |
font-weight: normal; |
|
| 10 | 25 |
line-height: 1.34; |
| 11 | 26 |
} |
| public/themes/soundsoftware/stylesheets/fonts.css | ||
|---|---|---|
| 1 |
|
|
| 2 |
/* Font pack generated by FontSquirrel */ |
|
| 3 | 1 |
|
| 4 | 2 |
@font-face {
|
| 5 |
font-family: 'GilliusADFNo2'; |
|
| 6 |
src: url('fonts/gilliusadfno2-bolditalic-webfont.eot');
|
|
| 7 |
src: local('☺'), url('fonts/gilliusadfno2-bolditalic-webfont.woff') format('woff'), url('fonts/gilliusadfno2-bolditalic-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-BoldItalic.otf') format('opentype'), url('fonts/gilliusadfno2-bolditalic-webfont.svg#webfontLmhvPwzc') format('svg');
|
|
| 8 |
font-weight: bold; |
|
| 9 |
font-style: italic; |
|
| 3 |
font-family: 'Insider'; |
|
| 4 |
font-weight: bold; |
|
| 5 |
font-style: normal; |
|
| 6 |
src: url('fonts/24BC0E_0_0.eot');
|
|
| 7 |
src: url('fonts/24BC0E_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC0E_0_0.woff') format('woff'), url('fonts/24BC0E_0_0.ttf') format('truetype');
|
|
| 8 |
} |
|
| 9 |
|
|
| 10 |
@font-face {
|
|
| 11 |
font-family: 'Insider'; |
|
| 12 |
font-weight: normal; |
|
| 13 |
font-style: normal; |
|
| 14 |
src: url('fonts/24BC35_0_0.eot');
|
|
| 15 |
src: url('fonts/24BC35_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC35_0_0.woff') format('woff'), url('fonts/24BC35_0_0.ttf') format('truetype');
|
|
| 10 | 16 |
} |
| 11 | 17 |
|
| 12 | 18 |
@font-face {
|
| 13 |
font-family: 'GilliusADFNo2';
|
|
| 14 |
src: url('fonts/gilliusadfno2-italic-webfont.eot');
|
|
| 15 |
src: local('☺'), url('fonts/gilliusadfno2-italic-webfont.woff') format('woff'), url('fonts/gilliusadfno2-italic-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Italic.otf') format('opentype'), url('fonts/gilliusadfno2-italic-webfont.svg#webfonteHBtzgS0') format('svg');
|
|
| 16 |
font-weight: normal;
|
|
| 17 |
font-style: italic;
|
|
| 19 |
font-family: 'Insider-Medium';
|
|
| 20 |
font-weight: normal;
|
|
| 21 |
font-style: normal;
|
|
| 22 |
src: url('fonts/24BC0E_0_0.eot');
|
|
| 23 |
src: url('fonts/24BC0E_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC0E_0_0.woff') format('woff'), url('fonts/24BC0E_0_0.ttf') format('truetype');
|
|
| 18 | 24 |
} |
| 19 |
|
|
| 25 |
|
|
| 20 | 26 |
@font-face {
|
| 21 |
font-family: 'GilliusADFNo2';
|
|
| 22 |
src: url('fonts/gilliusadfno2-bold-webfont.eot');
|
|
| 23 |
src: local('☺'), url('fonts/gilliusadfno2-bold-webfont.woff') format('woff'), url('fonts/gilliusadfno2-bold-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Bold.otf') format('opentype'), url('fonts/gilliusadfno2-bold-webfont.svg#webfontntXmQMqk') format('svg');
|
|
| 24 |
font-weight: bold;
|
|
| 25 |
font-style: normal;
|
|
| 27 |
font-family: 'Insider-Regular';
|
|
| 28 |
font-weight: normal;
|
|
| 29 |
font-style: normal;
|
|
| 30 |
src: url('fonts/24BC35_0_0.eot');
|
|
| 31 |
src: url('fonts/24BC35_0_0.eot?#iefix') format('embedded-opentype'), url('fonts/24BC35_0_0.woff') format('woff'), url('fonts/24BC35_0_0.ttf') format('truetype');
|
|
| 26 | 32 |
} |
| 27 |
|
|
| 28 |
@font-face {
|
|
| 29 |
font-family: 'GilliusADFNo2'; |
|
| 30 |
src: url('fonts/gilliusadfno2-regular-webfont.eot');
|
|
| 31 |
src: local('☺'), url('fonts/gilliusadfno2-regular-webfont.woff') format('woff'), url('fonts/gilliusadfno2-regular-webfont.ttf') format('truetype'), url('fonts/GilliusADFNo2-Regular.otf') format('opentype'), url('fonts/gilliusadfno2-regular-webfont.svg#webfontvJUiAdi3') format('svg');
|
|
| 32 |
font-weight: normal; |
|
| 33 |
font-style: normal; |
|
| 34 |
} |
|
| 35 |
|
|
| 36 |
@font-face {
|
|
| 37 |
font-family: 'DroidSans'; |
|
| 38 |
src: url('fonts/DroidSans-webfont.eot');
|
|
| 39 |
src: local('☺'), url('fonts/DroidSans-webfont.woff') format('woff'), url('fonts/DroidSans-webfont.ttf') format('truetype'), url('fonts/DroidSans-webfont.svg#webfontKYIQSBQk') format('svg');
|
|
| 40 |
font-weight: normal; |
|
| 41 |
font-style: normal; |
|
| 42 |
} |
|
| 43 |
|
|
| 44 |
@font-face {
|
|
| 45 |
font-family: 'DroidSans'; |
|
| 46 |
src: url('fonts/DroidSans-Bold-webfont.eot');
|
|
| 47 |
src: local('☺'), url('fonts/DroidSans-Bold-webfont.woff') format('woff'), url('fonts/DroidSans-Bold-webfont.ttf') format('truetype'), url('fonts/DroidSans-Bold-webfont.svg#webfontljpTCDjw') format('svg');
|
|
| 48 |
font-weight: bold; |
|
| 49 |
font-style: normal; |
|
| 50 |
} |
|
| 51 |
|
|
| 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