Merge branch 'szzh' into cxt_course
This commit is contained in:
commit
386990ebef
|
@ -469,6 +469,23 @@ class AdminController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#最近登录老师列表
|
||||||
|
def latest_login_teachers
|
||||||
|
scope = User.find_by_sql("SELECT * FROM users,user_extensions WHERE users.id = user_extensions.user_id AND user_extensions.identity=0 ORDER BY last_login_on DESC")
|
||||||
|
if params[:startdate].present?
|
||||||
|
scope = User.find_by_sql("SELECT * FROM users,user_extensions WHERE users.id = user_extensions.user_id AND user_extensions.identity=0 and last_login_on>= '#{params[:startdate]} 00:00:00' ORDER BY last_login_on DESC")
|
||||||
|
end
|
||||||
|
if params[:enddate].present?
|
||||||
|
scope = User.find_by_sql("SELECT * FROM users,user_extensions WHERE users.id = user_extensions.user_id AND user_extensions.identity=0 and last_login_on <= '#{params[:enddate]} 23:59:59' ORDER BY last_login_on DESC")
|
||||||
|
end
|
||||||
|
@teachers = scope
|
||||||
|
@teachers = paginateHelper @teachers,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#作业
|
#作业
|
||||||
def homework
|
def homework
|
||||||
@homework = HomeworkCommon.order('end_time desc')
|
@homework = HomeworkCommon.order('end_time desc')
|
||||||
|
|
|
@ -34,7 +34,7 @@ class RepositoriesController < ApplicationController
|
||||||
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
||||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked]
|
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked]
|
||||||
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
||||||
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked]
|
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff]
|
||||||
accept_rss_auth :revisions
|
accept_rss_auth :revisions
|
||||||
# hidden repositories filter // 隐藏代码过滤器
|
# hidden repositories filter // 隐藏代码过滤器
|
||||||
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
|
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
|
||||||
|
@ -521,6 +521,13 @@ update
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 每次提交对应的文件差异
|
||||||
|
def commit_diff
|
||||||
|
@commit_diff = $g.commit_diff(@project.gpid, params[:changeset])
|
||||||
|
@commit_details = $g.commit(@project.gpid, params[:changeset])
|
||||||
|
render :layout => 'base_projects'
|
||||||
|
end
|
||||||
|
|
||||||
def diff
|
def diff
|
||||||
if params[:format] == 'diff'
|
if params[:format] == 'diff'
|
||||||
@diff = @repository.diff(@path, @rev, @rev_to)
|
@diff = @repository.diff(@path, @rev, @rev_to)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,6 +41,16 @@ module RepositoriesHelper
|
||||||
identifiers.include?(iden) ? false :true
|
identifiers.include?(iden) ? false :true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 获取diff内容行号
|
||||||
|
def diff_line_num content
|
||||||
|
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
# 处理内容
|
||||||
|
def diff_content content
|
||||||
|
content.gsub!(/.*@@ -\d+,\d+ \+\d+,\d+ @@\n/m,'')
|
||||||
|
end
|
||||||
|
|
||||||
def format_revision(revision)
|
def format_revision(revision)
|
||||||
if revision.respond_to? :format_identifier
|
if revision.respond_to? :format_identifier
|
||||||
revision.format_identifier
|
revision.format_identifier
|
||||||
|
|
|
@ -85,6 +85,11 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def link_to_user_version(version, options = {})
|
||||||
|
return '' unless version && version.is_a?(Version)
|
||||||
|
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "linkBlue"
|
||||||
|
end
|
||||||
|
|
||||||
# 统计未读消息数
|
# 统计未读消息数
|
||||||
def unviewed_message(user)
|
def unviewed_message(user)
|
||||||
course_count = CourseMessage.where("user_id =? and viewed =?", user, 0).count
|
course_count = CourseMessage.where("user_id =? and viewed =?", user, 0).count
|
||||||
|
|
|
@ -651,8 +651,8 @@ class Attachment < ActiveRecord::Base
|
||||||
|
|
||||||
def decrease_attchments_count
|
def decrease_attchments_count
|
||||||
if self.container_type == "Project" && !self.project.project_score.nil?
|
if self.container_type == "Project" && !self.project.project_score.nil?
|
||||||
aatach_count = self.container.project_score.attach_num - 1
|
attach_count = self.container.project_score.attach_num - 1
|
||||||
self.container.project_score.update_attribute(:attach_num, aatach_count)
|
self.container.project_score.update_attribute(:attach_num, attach_count < 0 ? 0 : attach_count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -184,7 +184,7 @@ class Issue < ActiveRecord::Base
|
||||||
def decrease_issues_count
|
def decrease_issues_count
|
||||||
unless self.project.project_score.nil?
|
unless self.project.project_score.nil?
|
||||||
issue_count = self.project.project_score.issue_num - 1
|
issue_count = self.project.project_score.issue_num - 1
|
||||||
self.project.project_score.update_attribute(:issue_num, issue_count)
|
self.project.project_score.update_attribute(:issue_num, issue_count < 0 ? 0 : issue_count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -219,8 +219,9 @@ class Journal < ActiveRecord::Base
|
||||||
# 减少留言数量统计
|
# 减少留言数量统计
|
||||||
def decrease_issues_journal_count
|
def decrease_issues_journal_count
|
||||||
unless self.issue.project.nil?
|
unless self.issue.project.nil?
|
||||||
project = self.issue.project
|
journal_count = self.issue.project.project_score.issue_journal_num - 1
|
||||||
project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num - 1)
|
# project = self.issue.project
|
||||||
|
self.issue.project.project_score.update_attribute(:issue_journal_num, journal_count < 0 ? 0 : journal_count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -146,10 +146,10 @@ class Message < ActiveRecord::Base
|
||||||
# 讨论区
|
# 讨论区
|
||||||
if self.parent_id.nil?
|
if self.parent_id.nil?
|
||||||
count = self.project.project_score.board_num - 1
|
count = self.project.project_score.board_num - 1
|
||||||
self.project.project_score.update_attribute(:board_num, count)
|
self.project.project_score.update_attribute(:board_num, count < 0 ? 0 : count)
|
||||||
else # 回复
|
else # 回复
|
||||||
count = self.project.project_score.board_message_num - 1
|
count = self.project.project_score.board_message_num - 1
|
||||||
self.project.project_score.update_attribute(:board_message_num, count)
|
self.project.project_score.update_attribute(:board_message_num, count < 0 ? 0 : count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -126,7 +126,7 @@ class News < ActiveRecord::Base
|
||||||
def decrease_news_count
|
def decrease_news_count
|
||||||
if self.project && !self.project.project_score.nil?
|
if self.project && !self.project.project_score.nil?
|
||||||
count = self.project.project_score.news_num - 1
|
count = self.project.project_score.news_num - 1
|
||||||
self.project.project_score.update_attribute(:news_num, count)
|
self.project.project_score.update_attribute(:news_num, count < 0 ? 0 : count)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to '用户', {:action => 'latest_login_users'}, class: "#{current_page?(latest_login_users_path)? 'selected' : nil }" %></li>
|
||||||
|
<li><%= link_to '老师', {:action => 'latest_login_teachers'}, class: "#{current_page?(latest_login_teachers_path)? 'selected' : nil }" %></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,84 @@
|
||||||
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %>
|
||||||
|
<h3>
|
||||||
|
<%=l(:label_latest_login_user_list)%>
|
||||||
|
</h3>
|
||||||
|
<%= render 'tab_users' %>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
最近登录老师列表
|
||||||
|
</h3>
|
||||||
|
<%= form_tag({}, :method => :get) do %>
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<%= l(:label_filter_plural) %>
|
||||||
|
</legend>
|
||||||
|
<label style="float:left">开始日期:</label>
|
||||||
|
<%= text_field_tag 'startdate', params[:startdate], :size => 15, :onchange=>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
||||||
|
<%= calendar_for('startdate')%><span style="float: left "> </span>
|
||||||
|
<label style="float:left">结束日期:</label>
|
||||||
|
<%= text_field_tag 'enddate', params[:enddate], :size => 15, :onchange =>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
||||||
|
<%= calendar_for('enddate')%>
|
||||||
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||||
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'latest_login_teachers'}, :class => 'icon icon-reload' %>
|
||||||
|
</fieldset>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
登录时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
用户id
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户姓名
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户登录名
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户身份
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page * 30 %>
|
||||||
|
<% for teacher in @teachers do %>
|
||||||
|
<tr>
|
||||||
|
<% @count +=1 %>
|
||||||
|
<td align="center">
|
||||||
|
<%=@count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=format_time(teacher.last_login_on) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=teacher.id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if teacher.try(:realname) == ' '%><%= teacher.login%><% else %><%=teacher.try(:realname) %><% end %>'>
|
||||||
|
<% if teacher.try(:realname) == ' '%>
|
||||||
|
<%= link_to(teacher.login, user_path(teacher)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(teacher.try(:realname), user_path(teacher)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=link_to(teacher.login, user_path(teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
老师
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
|
@ -2,7 +2,10 @@
|
||||||
<h3>
|
<h3>
|
||||||
<%=l(:label_latest_login_user_list)%>
|
<%=l(:label_latest_login_user_list)%>
|
||||||
</h3>
|
</h3>
|
||||||
|
<%= render 'tab_users' %>
|
||||||
|
<h3>
|
||||||
|
<%=l(:label_latest_login_user_list)%>
|
||||||
|
</h3>
|
||||||
<%= form_tag({}, :method => :get) do %>
|
<%= form_tag({}, :method => :get) do %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>
|
<legend>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
|
<a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
|
||||||
</th>
|
</th>
|
||||||
<td class="line-code">
|
<td class="line-code">
|
||||||
<pre style="width:auto;white-space: nowrap; "><%= line.html_safe %></pre>
|
<pre style="width:auto;white-space: nowrap;overflow: auto; "><%= line.html_safe %></pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% line_num += 1 %>
|
<% line_num += 1 %>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<%= favicon %>
|
<%= favicon %>
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= stylesheet_link_tag 'header','public', 'pleft', 'project','prettify','jquery/jquery-ui-1.9.2','repository','share' %>
|
<%= stylesheet_link_tag 'header','scm','public', 'pleft', 'project','prettify','jquery/jquery-ui-1.9.2','repository','share' %>
|
||||||
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %>
|
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %>
|
||||||
|
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
|
|
|
@ -114,9 +114,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="homepagePostDeadline">
|
<% if activity.anonymous_comment == 0%>
|
||||||
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
<div class="homepagePostDeadline">
|
||||||
</div>
|
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% if activity.anonymous_comment == 0%>
|
<% if activity.anonymous_comment == 0%>
|
||||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
||||||
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="commit-row-info">
|
||||||
|
<% if !user_commit_rep(changeset.author_email).nil? %>
|
||||||
|
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
|
||||||
|
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||||
|
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>提交于
|
||||||
|
<div class="committed_ago">
|
||||||
|
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>前 </time>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<span class="commit-author-name"><%= changeset.author_email %></span>提交于
|
||||||
|
<div class="committed_ago">
|
||||||
|
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
|
@ -24,10 +24,10 @@
|
||||||
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
|
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
|
||||||
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
|
<!--<td class="size"><%#= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>-->
|
||||||
<% if @repository.report_last_commit %>
|
<% if @repository.report_last_commit %>
|
||||||
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>
|
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>
|
||||||
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
||||||
<td class="author"><%= entry.author %></td>
|
<td class="author"><%= entry.author %></td>
|
||||||
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %></td>
|
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -20,27 +20,13 @@
|
||||||
<div class="col-md-10 col-sm-12">
|
<div class="col-md-10 col-sm-12">
|
||||||
<ul class="bordered-list">
|
<ul class="bordered-list">
|
||||||
<li class="commit js-toggle-container">
|
<li class="commit js-toggle-container">
|
||||||
<div class="commit-row-info">
|
<%= render :partial => 'commit_details', :locals => {:changeset => changeset} %>
|
||||||
<% if !user_commit_rep(changeset.author_email).nil? %>
|
|
||||||
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
|
|
||||||
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
|
||||||
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>提交于
|
|
||||||
<div class="committed_ago">
|
|
||||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>前 </time>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<span class="commit-author-name"><%= changeset.author_email %></span>提交于
|
|
||||||
<div class="committed_ago">
|
|
||||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div style="padding-left:30px;" class="commit-row-title">
|
<div style="padding-left:30px;" class="commit-row-title">
|
||||||
<strong class="str-truncated">
|
<strong class="str-truncated">
|
||||||
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
|
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
|
||||||
</strong>
|
</strong>
|
||||||
<div class="pull-right" title="修订号">
|
<div class="pull-right" title="修订号">
|
||||||
<%= h truncate(changeset.short_id.to_s, :length => 20) %>
|
<%= link_to truncate(changeset.short_id.to_s, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => project.id, :changeset => changeset.id} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="notes_count">
|
<div class="notes_count">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
|
|
||||||
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path ,:revisions => @commits, :entry => @entry ,:commits_pages =>@commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
<div class="project_r_h">
|
||||||
|
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
||||||
|
</div>
|
||||||
|
<!--<script>-->
|
||||||
|
<!--// $(document).ready(function(){-->
|
||||||
|
<!--// $("#changed-files").click(function(){-->
|
||||||
|
<!--// $("#changed-files-detail").toggle();-->
|
||||||
|
<!--// });-->
|
||||||
|
<!--// });-->
|
||||||
|
<!--</script>-->
|
||||||
|
<div class="showing-changes-info fontGrey2"> Commit <a href="javascript:void()" class="linkGrey3">
|
||||||
|
<%= @commit_details.id %></a><br />
|
||||||
|
<li class="commit js-toggle-container">
|
||||||
|
<%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div class="showing-changes-project f14"><%= @commit_details.message %></div>
|
||||||
|
<!--<div class="showing-changes-row fontGrey2">Showing <a href="javascript:void()" class="linkGrey3" id="changed-files">3 changed files</a> with <span class="c_green">3 additions</span> and <span class="c_red">3 deletions</span>-->
|
||||||
|
<!--<ol class="mt10" id="changed-files-detail">-->
|
||||||
|
<!--<li><a href="javascript:void()" class="linkGrey3" id="changed-files">app/views/organizations/_org_course_homework.html.erb</a> </li>-->
|
||||||
|
<!--<li><a href="javascript:void()" class="linkGrey3" id="changed-files">app/views/users/_course_homework.html.erb</a> </li>-->
|
||||||
|
<!--<li><a href="javascript:void()" class="linkGrey3" id="changed-files">app/views/users/_user_homework_detail.html.erb</a> </li>-->
|
||||||
|
<!--</ol>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<% @commit_diff.each do |cd| %>
|
||||||
|
<div class="showing-changes-row fontGrey2">
|
||||||
|
<a href="javascript:void()" class="linkGrey3" id="changed-files">
|
||||||
|
<img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" /><%= cd.new_path %>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="filecontent syntaxhl" style="width:100%;" >
|
||||||
|
<tbody>
|
||||||
|
<% line_num = diff_line_num(cd.diff) %>
|
||||||
|
<% diff_content = diff_content(cd.diff) %>
|
||||||
|
<% syntax_highlight_lines(cd.new_path, Redmine::CodesetUtil.to_utf8_by_setting(diff_content)).each do |line| %>
|
||||||
|
<tr>
|
||||||
|
<th class="line-num" id="L<%= line_num %>" style="vertical-align: top;">
|
||||||
|
<a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
|
||||||
|
</th>
|
||||||
|
<% if line[0,1] == "-" %>
|
||||||
|
<td class="line-code diff_out"><pre style="width:auto;white-space: nowrap; "><%= line.html_safe %></pre></td>
|
||||||
|
<% elsif line[0,1] == "+" %>
|
||||||
|
<td class="line-code diff_in"><pre style="width:auto;white-space: nowrap; "><%= line.html_safe %></pre></td>
|
||||||
|
<% else%>
|
||||||
|
<td class="line-code"><pre style="width:auto;white-space: nowrap; "><%= line.html_safe %></pre></td>
|
||||||
|
<% end %>
|
||||||
|
</tr>
|
||||||
|
<% line_num += 1 %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -1,11 +1,11 @@
|
||||||
<% if @obj %>
|
<% if @obj %>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
|
||||||
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
|
:locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
|
||||||
$("#tags_name_<%=@obj.id%>").val("");
|
$("#tags_name_<%=@obj.id%>").val("");
|
||||||
$("#add_tag_<%=@obj.id%>").hide();
|
$("#add_tag_<%=@obj.id%>").hide();
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#course_list").html("<%= escape_javascript(render :partial => 'files/project_list',
|
$("#course_list").html("<%= escape_javascript(render :partial => 'files/project_list',
|
||||||
:locals => {project: @project,all_attachments: @all_attachments,sort:@sort,order:@order,project_attachments:@obj_attachments}) %>");
|
:locals => {project: @project,all_attachments: @all_attachments,sort:@sort,order:@order,project_attachments:@obj_attachments}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
$("#files_tag_project").html("<%= escape_javascript(render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project,:tag_name => @select_tag_name}) %>");
|
$("#files_tag_project").html("<%= escape_javascript(render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project,:tag_name => @select_tag_name}) %>");
|
|
@ -114,9 +114,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="homepagePostDeadline">
|
<% if activity.anonymous_comment == 0%>
|
||||||
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
<div class="homepagePostDeadline">
|
||||||
</div>
|
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% if activity.anonymous_comment == 0%>
|
<% if activity.anonymous_comment == 0%>
|
||||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
||||||
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
||||||
|
|
|
@ -115,9 +115,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div>
|
<div>
|
||||||
<div class="homepagePostDeadline">
|
<% if homework_common.anonymous_comment == 0 %>
|
||||||
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
<div class="homepagePostDeadline">
|
||||||
</div>
|
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% if homework_common.anonymous_comment == 0%>
|
<% if homework_common.anonymous_comment == 0%>
|
||||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
||||||
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
||||||
|
|
|
@ -834,7 +834,7 @@ RedmineApp::Application.routes.draw do
|
||||||
:controller => 'repositories',
|
:controller => 'repositories',
|
||||||
:format => false,
|
:format => false,
|
||||||
:constraints => {
|
:constraints => {
|
||||||
:action => /(browse|show|entry|raw|annotate|diff)/,
|
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
|
||||||
:rev => /[a-z0-9\.\-_]+/
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,15 +853,15 @@ RedmineApp::Application.routes.draw do
|
||||||
:controller => 'repositories',
|
:controller => 'repositories',
|
||||||
:format => false,
|
:format => false,
|
||||||
:constraints => {
|
:constraints => {
|
||||||
:action => /(browse|show|entry|raw|annotate|diff)/,
|
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
|
||||||
:rev => /[a-z0-9\.\-_]+/
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
}
|
}
|
||||||
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))',
|
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))',
|
||||||
:controller => 'repositories',
|
:controller => 'repositories',
|
||||||
:action => /(browse|show|entry|raw|changes|annotate|diff)/
|
:action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
|
||||||
get 'projects/:id/repository/:action(/*path(.:ext))',
|
get 'projects/:id/repository/:action(/*path(.:ext))',
|
||||||
:controller => 'repositories',
|
:controller => 'repositories',
|
||||||
:action => /(browse|show|entry|raw|changes|annotate|diff)/
|
:action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
|
||||||
|
|
||||||
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
||||||
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
||||||
|
@ -954,7 +954,8 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'admin/project_messages', as: :project_messages
|
match 'admin/project_messages', as: :project_messages
|
||||||
match'admin/course_messages', as: :course_messages
|
match'admin/course_messages', as: :course_messages
|
||||||
get 'admin/notices'
|
get 'admin/notices'
|
||||||
get 'admin/latest_login_users'
|
match 'admin/latest_login_users', as: :latest_login_users
|
||||||
|
match 'admin/latest_login_teachers', as: :latest_login_teachers
|
||||||
get 'admin/homework'
|
get 'admin/homework'
|
||||||
|
|
||||||
resources :auth_sources do
|
resources :auth_sources do
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -688,7 +688,7 @@ p.other-formats { text-align: right; font-size:0.9em; color: #666; }
|
||||||
|
|
||||||
/*pre标签换行*/
|
/*pre标签换行*/
|
||||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||||
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
|
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
|
||||||
|
|
||||||
/*问题跟踪attachment显示*/
|
/*问题跟踪attachment显示*/
|
||||||
div.attachments { margin-top: 12px; }
|
div.attachments { margin-top: 12px; }
|
||||||
|
@ -890,9 +890,9 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
||||||
/*end*/
|
/*end*/
|
||||||
/***** Diff *****/
|
/***** Diff *****/
|
||||||
.diff_out { background: #fcc; }
|
.diff_out { background: #fcc; }
|
||||||
.diff_out span { background: #faa; }
|
/*.diff_out span { background: #faa; }*/
|
||||||
.diff_in { background: #cfc; }
|
.diff_in { background: #cfc; }
|
||||||
.diff_in span { background: #afa; }
|
/*.diff_in span { background: #afa; }*/
|
||||||
|
|
||||||
.text-diff {
|
.text-diff {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
@ -1163,3 +1163,18 @@ div.disable_link {background-color: #c1c1c1 !important;}
|
||||||
.proInfoBox2{ border:1px solid #dddddd; height:45px; padding:10px 0; background-color:#f1f1f1;}
|
.proInfoBox2{ border:1px solid #dddddd; height:45px; padding:10px 0; background-color:#f1f1f1;}
|
||||||
.proInfoBox2 ul li{ height:24px; position:relative;}
|
.proInfoBox2 ul li{ height:24px; position:relative;}
|
||||||
.maxwidth150{max-width: 150px;}
|
.maxwidth150{max-width: 150px;}
|
||||||
|
|
||||||
|
/*版本库diff*/
|
||||||
|
.showing-changes-info {width:650px; padding:10px; padding-top: 0px; background-color:#ffffff; line-height:2;}
|
||||||
|
.showing-changes-project {width:650px; padding:10px; border-top:1px solid #dce0e6; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||||
|
.showing-changes-row {width:650px; padding:10px; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||||
|
#changed-files-detail {display:none;}
|
||||||
|
#changed-files-detail li {list-style-type:disc; margin-left:15px;}
|
||||||
|
.showing-changes-detail {width:670px; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||||
|
.changes-detail-chart {width:100%; overflow:auto; border-collapse:collapse; margin:0px; padding:0px; background-color:#f1f1f1;}
|
||||||
|
.diff-line-number {width:35px; min-width:35px; max-width:50px; border-right:1px solid #c1c1c1; padding:0px 5px; text-align:right; background-color:#f1f1f1;}
|
||||||
|
.code-line-old {background-color:#ffecec;}
|
||||||
|
.number-line-old {background-color:#ffdddd; border-color:#f1c0c0;}
|
||||||
|
.code-line-new {background-color:#eaffea;}
|
||||||
|
.number-line-new {background-color:#dbffdb; border-color:#c1e9c1;}
|
||||||
|
.branch-label {padding-right: 5px; border-radius:2px; color:#888888; display:inline-block; background-color:#f8fafc;}
|
||||||
|
|
Loading…
Reference in New Issue