Merge branch 'szzh' into cxt_course

This commit is contained in:
cxt 2016-02-26 16:58:48 +08:00
commit 386990ebef
27 changed files with 967 additions and 755 deletions

View File

@ -469,6 +469,23 @@ class AdminController < ApplicationController
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
@homework = HomeworkCommon.order('end_time desc')

View File

@ -34,7 +34,7 @@ class RepositoriesController < ApplicationController
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_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
# hidden repositories filter // 隐藏代码过滤器
before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ]
@ -521,6 +521,13 @@ update
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
if params[:format] == 'diff'
@diff = @repository.diff(@path, @rev, @rev_to)

File diff suppressed because it is too large Load Diff

View File

@ -41,6 +41,16 @@ module RepositoriesHelper
identifiers.include?(iden) ? false :true
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)
if revision.respond_to? :format_identifier
revision.format_identifier

View File

@ -85,6 +85,11 @@ module UsersHelper
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)
course_count = CourseMessage.where("user_id =? and viewed =?", user, 0).count

View File

@ -651,8 +651,8 @@ class Attachment < ActiveRecord::Base
def decrease_attchments_count
if self.container_type == "Project" && !self.project.project_score.nil?
aatach_count = self.container.project_score.attach_num - 1
self.container.project_score.update_attribute(:attach_num, aatach_count)
attach_count = self.container.project_score.attach_num - 1
self.container.project_score.update_attribute(:attach_num, attach_count < 0 ? 0 : attach_count)
end
end
end

View File

@ -184,7 +184,7 @@ class Issue < ActiveRecord::Base
def decrease_issues_count
unless self.project.project_score.nil?
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

View File

@ -219,8 +219,9 @@ class Journal < ActiveRecord::Base
# 减少留言数量统计
def decrease_issues_journal_count
unless self.issue.project.nil?
project = self.issue.project
project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num - 1)
journal_count = self.issue.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

View File

@ -146,10 +146,10 @@ class Message < ActiveRecord::Base
# 讨论区
if self.parent_id.nil?
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 # 回复
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

View File

@ -126,7 +126,7 @@ class News < ActiveRecord::Base
def decrease_news_count
if self.project && !self.project.project_score.nil?
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

View File

@ -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>

View File

@ -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 ">&nbsp;&nbsp;&nbsp;</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')%> &nbsp;
<%= 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 %>
&nbsp;
<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>

View File

@ -2,7 +2,10 @@
<h3>
<%=l(:label_latest_login_user_list)%>
</h3>
<%= render 'tab_users' %>
<h3>
<%=l(:label_latest_login_user_list)%>
</h3>
<%= form_tag({}, :method => :get) do %>
<fieldset>
<legend>

View File

@ -8,7 +8,7 @@
<a href="#L<%= line_num %>" style="padding-top: 0px;"><%= line_num %></a>
</th>
<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>
</tr>
<% line_num += 1 %>

View File

@ -12,7 +12,7 @@
<%= favicon %>
<%= javascript_heads %>
<%= 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' %>
<%= call_hook :view_layouts_base_html_head %>

View File

@ -114,9 +114,11 @@
</div>
<div class="cl"></div>
<div>
<div class="homepagePostDeadline">
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
</div>
<% if activity.anonymous_comment == 0%>
<div class="homepagePostDeadline">
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
</div>
<% end %>
<% if activity.anonymous_comment == 0%>
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%>&nbsp;23:59

View File

@ -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>&nbsp;
</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>&nbsp;
</div>
<% end %>
</div>

View File

@ -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>-->
<% if @repository.report_last_commit %>
<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="author"><%= entry.author %></td>
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) 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="author"><%= entry.author %></td>
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %></td>
<% end %>
</tr>
<% end %>

View File

@ -20,27 +20,13 @@
<div class="col-md-10 col-sm-12">
<ul class="bordered-list">
<li class="commit js-toggle-container">
<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>&nbsp;
</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>&nbsp;
</div>
<% end %>
</div>
<%= render :partial => 'commit_details', :locals => {:changeset => changeset} %>
<div style="padding-left:30px;" class="commit-row-title">
<strong class="str-truncated">
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
</strong>
<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 class="notes_count">
</div>

View File

@ -15,7 +15,7 @@
<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>
<% content_for :header_tags do %>

View File

@ -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 %>

View File

@ -1,11 +1,11 @@
<% if @obj %>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#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}) %>');
$("#tags_name_<%=@obj.id%>").val("");
$("#add_tag_<%=@obj.id%>").hide();
<% else %>
$("#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}) %>");
<% end %>
<% if @obj %>
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
$("#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}) %>');
$("#tags_name_<%=@obj.id%>").val("");
$("#add_tag_<%=@obj.id%>").hide();
<% else %>
$("#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}) %>");
<% 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}) %>");

View File

@ -114,9 +114,11 @@
</div>
<div class="cl"></div>
<div>
<div class="homepagePostDeadline">
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
</div>
<% if activity.anonymous_comment == 0%>
<div class="homepagePostDeadline">
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
</div>
<% end %>
<% if activity.anonymous_comment == 0%>
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%>&nbsp;23:59

View File

@ -115,9 +115,11 @@
</div>
<div class="cl"></div>
<div>
<div class="homepagePostDeadline">
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
</div>
<% if homework_common.anonymous_comment == 0 %>
<div class="homepagePostDeadline">
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
</div>
<% end %>
<% if homework_common.anonymous_comment == 0%>
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%>&nbsp;23:59

View File

@ -834,7 +834,7 @@ RedmineApp::Application.routes.draw do
:controller => 'repositories',
:format => false,
:constraints => {
:action => /(browse|show|entry|raw|annotate|diff)/,
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
:rev => /[a-z0-9\.\-_]+/
}
@ -853,15 +853,15 @@ RedmineApp::Application.routes.draw do
:controller => 'repositories',
:format => false,
:constraints => {
:action => /(browse|show|entry|raw|annotate|diff)/,
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
:rev => /[a-z0-9\.\-_]+/
}
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))',
: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))',
: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', :to => 'repositories#show', :path => nil
@ -954,7 +954,8 @@ RedmineApp::Application.routes.draw do
match 'admin/project_messages', as: :project_messages
match'admin/course_messages', as: :course_messages
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'
resources :auth_sources do

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -688,7 +688,7 @@ p.other-formats { text-align: right; font-size:0.9em; color: #666; }
/*pre标签换行*/
.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显示*/
div.attachments { margin-top: 12px; }
@ -890,9 +890,9 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
/*end*/
/***** Diff *****/
.diff_out { background: #fcc; }
.diff_out span { background: #faa; }
/*.diff_out span { background: #faa; }*/
.diff_in { background: #cfc; }
.diff_in span { background: #afa; }
/*.diff_in span { background: #afa; }*/
.text-diff {
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 ul li{ height:24px; position:relative;}
.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;}