move 2013.8.29

exceptionHandle
zhangyang 12 years ago
parent 4f2b26a9c5
commit 4d82cad51d

@ -33,6 +33,9 @@ class BoardsController < ApplicationController
@board = @boards.first
show
end
if @project.project_type
render :layout => 'base_courses'
end
end
def show
@ -54,7 +57,11 @@ class BoardsController < ApplicationController
preload(:author, {:last_reply => :author}).
all
@message = Message.new(:board => @board)
render :action => 'show', :layout => !request.xhr?
if @project.project_type
render :action => 'show', :layout => 'base_courses'
else
render :action => 'show', :layout => !request.xhr?
end
}
format.atom {
@messages = @board.messages.
@ -70,6 +77,9 @@ class BoardsController < ApplicationController
def new
@board = @project.boards.build
@board.safe_attributes = params[:board]
if @project.project_type
render :layout => 'base_courses'
end
end
def create
@ -90,6 +100,9 @@ class BoardsController < ApplicationController
end
def update
if @project.project_type
render :layout => 'base_courses'
end
@board.safe_attributes = params[:board]
if @board.save
redirect_to_settings_in_projects

@ -40,11 +40,18 @@ class DocumentsController < ApplicationController
@grouped = documents.group_by(&:category)
end
@document = @project.documents.build
render :layout => false if request.xhr?
if @project.project_type
render :layout => 'base_courses'
else
render :layout => false if request.xhr?
end
end
def show
@attachments = @document.attachments.all
if @project.project_type
render :action => 'show', :layout => 'base_courses'
end
end
def new

@ -34,11 +34,20 @@ class FilesController < ApplicationController
@containers = [ Project.includes(:attachments).reorder(sort_clause).find(@project.id)]
@containers += @project.versions.includes(:attachments).reorder(sort_clause).all.sort.reverse
render :layout => !request.xhr?
@course_tag = @project.project_type
if @course_tag
render :layout => 'base_courses'
else
render :layout => !request.xhr?
end
end
def new
@versions = @project.versions.sort
@course_tag = @project.project_type
if @course_tag
render :layout => 'base_courses'
end
end
def create

@ -49,7 +49,11 @@ class MessagesController < ApplicationController
all
@reply = Message.new(:subject => "RE: #{@message.subject}")
render :action => "show", :layout => "base_projects"#by young
if @message.board.project.project_type
render :action => "show", :layout => "base_courses"#by young
else
render :action => "show", :layout => "base_projects"#by young
end
end
# Create a new topic

@ -19,14 +19,15 @@ class ProjectsController < ApplicationController
layout 'base_projects'# by young
menu_item :overview
menu_item :roadmap, :only => :roadmap
# menu_item :settings, :only => :settings
menu_item :settings, :only => :settings
menu_item :homework, :only => :homework
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback]
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy, :statistics]
before_filter :authorize, :except => [:new_homework, :homework, :statistics, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback]
before_filter :authorize_global, :only => [:new, :create]
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
#by young
before_filter :member, :file, :statistics
before_filter :member, :file
#
accept_rss_auth :index
accept_api_auth :index, :show, :create, :update, :destroy
@ -36,7 +37,9 @@ class ProjectsController < ApplicationController
controller.send :expire_action, :controller => 'welcome', :action => 'robots'
end
end
helper :bids
include BidsHelper
helper :sort
include SortHelper
helper :custom_fields
@ -51,32 +54,11 @@ class ProjectsController < ApplicationController
helper :activities
helper :documents
helper :watchers
### added by william
include ActsAsTaggableOn::TagsHelper
# Lists visible projects
# def index
# respond_to do |format|
# format.html {
# scope = Project
# unless params[:closed]
# scope = scope.active
# end
# @projects = scope.visible.order('lft').all
# }
# format.api {
# @offset, @limit = api_offset_and_limit
# @project_count = Project.visible.count
# @projects = Project.visible.offset(@offset).limit(@limit).order('lft').all
# }
# format.atom {
# projects = Project.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all
# render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}")
# }
# end
# end
def index
#Modified by nie
# @offset, @limit = api_offset_and_limit({:limit => 10})
@ -123,6 +105,33 @@ class ProjectsController < ApplicationController
end
end
#Added by young
def homework
@offset, @limit = api_offset_and_limit({:limit => 10})
@bids = Bid.visible
@bids = @bids.like(params[:name]) if params[:name].present?
@bid_count = @bids.count
@bid_pages = Paginator.new @bid_count, @limit, params['page']
@offset ||= @bid_pages.reverse_offset
#@bids = @bids.offset(@offset).limit(@limit).all.reverse
unless @offset == 0
@bids = @bids.offset(@offset).limit(@limit).all.reverse
else
limit = @bid_count % @limit
@bids = @bids.offset(@offset).limit(limit).all.reverse
end
render :layout => 'base_courses'
end
def new_homework
@homework = Bid.new
@homework.safe_attributes = params[:bid]
render :layout => 'base_courses'
end
#Ended by young
def feedback
@jours = @project.journals_for_messages.reverse
@limit = 10
@ -134,14 +143,17 @@ class ProjectsController < ApplicationController
end
def new
@course_tag = params[:course]
@issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all
@project = Project.new
@project.safe_attributes = params[:project]
render :layout => 'base'
end
def create
@course_tag = params[:project][:project_type]
@issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all
@project = Project.new
@ -163,8 +175,12 @@ class ProjectsController < ApplicationController
if params[:continue]
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
redirect_to new_project_path(attrs)
#Added by young
elsif params[:course_continue]
redirect_to new_project_path(:course => '1')
#Ended by young
else
redirect_to settings_project_path(@project)
redirect_to settings_project_path(@project, :course => @course_tag)
end
}
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
@ -276,8 +292,9 @@ class ProjectsController < ApplicationController
end
@document = @project.documents.build
#
@base_courses_tag = @project.project_type
respond_to do |format|
format.html
format.html{render :layout => 'base_courses' if @base_courses_tag }
format.api
end
end
@ -289,6 +306,12 @@ class ProjectsController < ApplicationController
@member ||= @project.members.new
@trackers = Tracker.sorted.all
@wiki ||= @project.wiki
#Added by young
@course_tag = params[:course]
if @course_tag == '1'
render :layout => 'base_courses'
end
#Ended by young
end
def edit
@ -302,9 +325,6 @@ class ProjectsController < ApplicationController
def file
end
def statistics
end
#end
def update

@ -43,15 +43,26 @@ class RepositoriesController < ApplicationController
@repository = Repository.factory(scm)
@repository.is_default = @project.repository.nil?
@repository.project = @project
render :layout => 'base_projects'
@course_tag = params[:course]
if @course_tag
render :layout => 'base_courses'
else
render :layout => 'base_projects'
end
end
def newrepo
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
@repository = Repository.factory(scm)
@repository.is_default = @project.repository.nil?
@repository.project = @project
render :layout => 'base_projects'
@course_tag = params[:course]
if @course_tag
render :layout => 'base_courses'
else
render :layout => 'base_projects'
end
end
def fork
@ -209,7 +220,12 @@ class RepositoriesController < ApplicationController
@changesets = @repository.latest_changesets(@path, @rev)
@properties = @repository.properties(@path, @rev)
@repositories = @project.repositories
render :action => 'show', :layout => 'base_projects'
@course_tag = params[:course]
if @course_tag
render :action => 'show', :layout => 'base_courses'
else
render :action => 'show', :layout => 'base_projects'
end
end
end
@ -369,6 +385,8 @@ class RepositoriesController < ApplicationController
end
def stats
@project_id = params[:id]
@repository_id = @repository.identifier
render :layout => 'base_projects'
end

@ -35,8 +35,20 @@ module ProjectsHelper
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities}
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
end
#Added by young
def course_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural},
{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
{:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
end
#Ended by young
def parent_project_select_tag(project)
selected = project.parent
# retrieve the requested parent project
@ -54,7 +66,13 @@ module ProjectsHelper
# Renders the projects index
def render_project_hierarchy(projects)
render_project_nested_lists(projects) do |project|
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
#Modified by young
if project.project_type
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")+"<span style='color:#F00;'>(#{l(:label_course)})</span>".html_safe
else
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
end
#Ended by young
if project.description.present?
#Delete by nie.
# s << content_tag('td', textilizable(project.short_description, :project => project), :class => 'wiki description')

@ -0,0 +1,7 @@
# Added by young
class JournalsForMessageObserver < ActiveRecord::Observer
def after_create(journal_for_message)
Mailer.journals_for_message_add(User.current, journal_for_message).deliver
end
end

@ -26,6 +26,15 @@ class Mailer < ActionMailer::Base
def self.default_url_options
{ :host => Setting.host_name, :protocol => Setting.protocol }
end
# Builds a Mail::Message object used to email recipients of the added journals for message.
#
def journals_for_message_add(user, journals_for_message)
@user = User.current
@url = url_for(:controller => 'users', :action => 'user_newfeedback')
mail :to => user.mail,
:subject => "hello"
end
# Builds a Mail::Message object used to email recipients of the added issue.
#

@ -681,7 +681,8 @@ class Project < ActiveRecord::Base
'custom_field_values',
'custom_fields',
'tracker_ids',
'issue_custom_field_ids'
'issue_custom_field_ids',
'project_type'
safe_attributes 'enabled_module_names',
:if => lambda {|project, user| project.new_record? || user.allowed_to?(:select_project_modules, project) }

@ -0,0 +1,146 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%= render :partial => 'layouts/base_header'%>
<div id="main">
<!--project page-->
<div id="sidebar">
<div class="spaceleft">
<!--informations-->
<div class="inf_user_image">
<% @project = Project.find_by_id(@project.id)%>
<table>
<tr>
<td><%= link_to image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
<td align="center">
<div class="info_font" style=" word-wrap: break-word; word-break: break-all">
<%= textilizable @project.name %>
</div>
</td>
</tr>
</table>
</div>
<!--parameter-->
<div class="user_fans">
<table width="240" border="0">
<tr align="center" width="80px">
<% files_count = @project.attachments.count %>
<% @project.versions.each do |version| %>
<% files_count += version.attachments.count %>
<% end %>
<td class="font_index"><%=link_to "#{@project.members.count}", project_member_path(@project) %></td>
<td class="font_index"><%=link_to "#{@project.issues.count}", project_issues_path(@project) %></td>
<td class="font_index"><%=link_to files_count, project_files_path(@project) %></td>
<tr class="font_aram">
<td align="center" width="80px"> <%= l(:label_course_student) %></td>
<td align="center" width="80px"> <%= l(:label_homework) %></td>
<td align="center" width="80px"><%= l(:label_course_data) %></td>
</tr>
</table>
<div class="user_underline"></div>
</div>
<!--description-->
<div class="inf_user_context">
<div class="font_title_left">
<%= l(:label_project_overview) %>
</div>
<div style="padding-bottom: 8px">
<div class="font_lighter_sidebar">
<%= textilizable @project.description %>
</div>
<div class="created_on_project">
<strong style="color: #068d9c"><%= l(:label_create_time) %></strong><%= @project.created_on %>
</div>
</div>
<div class="user_underline"></div>
</div>
<!--tags-->
<div class="user_fans">
<!-- added by william -for tag -->
<div class="user_tags">
<div id="tags">
<%= render :partial => 'tags/tag', :locals => {:obj => @project,:object_flag => "2"}%>
</div></div>
</div>
<!--tool-->
<div class="user_underline"></div>
<div class="tool">
<div class="font_title_left">
<%= l(:label_project_tool)%>
</div>
<table class="font_tool">
<tr>
<td align="left" width="60px" valign="center"><%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
<%= link_to l(:project_module_documents),project_documents_path(@project) %></td>
</tr>
<tr>
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag2.png", weight:"15px", height:"15px") %>
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
</td>
</tr>
</table>
</div>
<div class="user_underline"></div>
</div>
</div>
<div id="content">
<div>教师名称XXX</div>
<div>所在单位:并行与分布重点实验室</div>
<div>课程学分X学分</div>
<div>课程学时XX学时</div>
<div>XXXXXXXXXXXX</div>
<div class="tabs">
<ul>
<li><%= link_to(l(:label_overview), project_path(@project))%></li>
<li><%= link_to(l(:label_homework), {:controller => 'projects', :action => 'homework'})%></li>
<li><%= link_to(l(:label_repository), { :controller => 'repositories', :action => 'show', :id => @project, :repository_id => nil, :path => nil, :rev => nil, :course => 1 })%></li>
<li><%= link_to(l(:label_settings),{:controller => 'projects', :action => 'settings', :id => @project, :course => 1})%></li></ul>
</div>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%= render_flash_messages %>
</div>
<%= render :partial => 'layouts/base_footer'%>
</div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
</div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

@ -0,0 +1,2 @@
<h1><%= link_to("hello", @url) %></h1>
<em><%=h @user %></em>

@ -39,7 +39,7 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<% @newss.each do |news| %>
<table width="660px" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;">
<table width="660px" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
<tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(news.author), :class => "avatar") %></td>
<td><table width="580px" border="0">

@ -0,0 +1,47 @@
<%= error_messages_for 'project' %>
<!--[form:project]-->
<% unless @project.new_record? %>
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
<% end %>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p><!--by young-->
<p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
<p style="margin-left:-10px;"><%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<p style="margin-left:-10px;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></p>
<p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p>
<%= wikitoolbar_for 'project_description' %>
<% @project.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :project, value %></p>
<% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
<!--[eoform:project]-->
<% unless @project.identifier_frozen? %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'project_identifier' %>
<% end %>
<% end %>
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
<%= javascript_tag do %>
$(document).ready(function() {
$("#project_inherit_members").change(function(){
if (!$(this).is(':checked')) {
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
$("#project_inherit_members").attr("checked", true);
}
}
});
});
<% end %>
<% end %>

@ -11,8 +11,8 @@
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
<p style="margin-left:-10px;"><%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<p style="margin-left:-10px;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %></em></p>
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
<%= wikitoolbar_for 'project_description' %>

@ -0,0 +1,34 @@
<!-- fq -->
<div class="project-search-block">
<table width="100%" valign="center">
<tr>
<td width="16%"><span style="margin-left:0px"><%= l(:label_course_homework_list)%></span></td>
<td valign="center"><% if User.current.logged? %>
<!-- <div class='icon icon-add'> -->
<%= link_to(l(:label_course_homework_new), {:controller => 'projects', :action => 'new_homework'}, :class => 'icon icon-add') %>
<!-- <%= toggle_link l(:label_new_call), 'put-bid-form', {:focus => 'project_id'} %> -->
<!-- </div> -->
<% end %></td>
<td align="right">
<div class="project-search">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:label_search), :class => "small", :name => nil %>
</div></td>
</tr></table>
</div>
<% if User.current.logged? %>
<div id="put-bid-form" style="display: none">
<%= render :partial => 'bids/new_bid' %>
</div>
<% end %>
<div id="bid-show">
<%= render :partial => 'bids/bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
</div>

@ -7,8 +7,8 @@
<table width="100%" valign="center">
<tr>
<td width="16%"><span style="margin-left:0px"><%= l(:label_project_plural)%></span></td>
<td valign="center"><%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %></td>
<td valign="center"><%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %></td>
<td valign="center"><%= link_to(l(:label_course_new), {:controller => 'projects', :action => 'new', :course => 1}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %></td>
<td align="right">
<div class="project-search">
<%= text_field_tag 'name', params[:name], :size => 30 %>
@ -17,12 +17,12 @@
</tr>
</table>
</div>
<%end%>
<% end %>
<div id="projects-index">
<%= render_project_hierarchy(@projects)%>
</div>
<!-- <p class="pagination"><%= pagination_links_full @project_pages%></p> -->
<div class="pagination">
<ul>
<%= pagination_links_full @project_pages %>

@ -1,12 +1,19 @@
<h3><%=l(:label_project_new)%></h3>
<%= labelled_form_for @project do |f| %>
<!--Added by young-->
<div class="box tabular">
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= javascript_tag "$('#project_name').focus();" %>
<% end %>
</div>
<% if @course_tag == '1' %>
<h3><%=l(:label_course_new)%></h3>
<div class="box tabular">
<%= render :partial => 'course_form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %>
<% else %>
<h3><%=l(:label_project_new)%></h3>
<div class="box tabular">
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<% end %>
<%= javascript_tag "$('#project_name').focus();" %>
</div>
<% end %>
<!--Ended by young-->

@ -0,0 +1,9 @@
<h3><%=l(:label_course_new_homework)%></h3>
<%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_bid'} do |f| %>
<div class="box tabular">
<%= render :partial => 'bids/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<%= javascript_tag "$('#bid_name').focus();" %>
<% end %>
</div>

@ -1,3 +1,7 @@
<h3><%=l(:label_settings)%></h3>
<%= render_tabs project_settings_tabs %>
<% if @course_tag %>
<%= render_tabs course_settings_tabs %>
<% else %>
<%= render_tabs project_settings_tabs %>
<% end %>
<% html_title(l(:label_settings)) -%>

@ -55,11 +55,12 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<% course_tag = @project.project_type %>
<% if User.current.allowed_to?(:manage_repository, @project) %>
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project, :course => course_tag), :class => 'icon icon-add' %></p>
<% end %>
<!-- no repository new by xianbo-->
<% if User.current.allowed_to?(:manage_repository, @project) %>
<p><%= l(:label_repository_no) %>
<%= link_to l(:label_repository_new_repos), newrepo_project_repository_path(@project), :class => 'icon icon-add' %></p>
<%= link_to l(:label_repository_new_repos), newrepo_project_repository_path(@project, :course => course_tag), :class => 'icon icon-add' %></p>
<% end %>

@ -10,7 +10,7 @@
<div>
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
<div class="issue-note">
<table width="660px" border="0" align="center">
<table width="660px" border="0" align="center" style="font-size: 14px;">
<tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%></td>
<td><table width="580px" border="0">

@ -3,7 +3,7 @@
<% end %>
<%= link_to l(:label_statistics),
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
{:controller => 'repositories', :action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
<%= form_tag({:action => controller.action_name,

@ -1,12 +1,6 @@
<h3><%= l(:label_statistics) %></h3>
<p>
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
</p>
<p>
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
</p>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
<% src = "http://localhost:3000/statistics/"+@project_id+"/index.html"%>
<iframe src=<%= src %> name="top" style="border:0;width:100%;height:1000px;"></iframe>
<% html_title(l(:label_repository), l(:label_statistics)) -%>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save