修改版本库显示代码样式,改成与编辑器显示一致

This commit is contained in:
huang 2016-10-25 15:10:23 +08:00
parent a0ff6a0cb1
commit 35c8157efa
5 changed files with 5 additions and 5 deletions

View File

@ -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;overflow: auto; "><%= line.html_safe %></pre> <pre style="width:auto;overflow: auto; "><%= line.html_safe %></pre>
</td> </td>
</tr> </tr>
<% line_num += 1 %> <% line_num += 1 %>

View File

@ -1,6 +1,6 @@
<% if @entry && @entry.kind == 'file' %> <% if @entry && @entry.kind == 'file' %>
<p class="mt13 mb13"> <p class="mt5 mb5">
<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
<% if @repository.supports_cat? %> <% if @repository.supports_cat? %>
<%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |

View File

@ -8,7 +8,7 @@
:repository_id => @repository.identifier_param, :repository_id => @repository.identifier_param,
:path => to_path_param(@path), :rev=> @rev}, :method => 'get') do %> :path => to_path_param(@path), :rev=> @rev}, :method => 'get') do %>
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %> <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
<p class="mt13 mb13"> <p class="mt5 mb5">
<%= l(:label_view_diff) %>: <%= l(:label_view_diff) %>:
<label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label> <label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label>
<label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label> <label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label>

View File

@ -782,7 +782,7 @@ a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; pa
.issues{ background:url(/images/public_icon.png) -66px 5px no-repeat; width:18px; height:21px;} .issues{ background:url(/images/public_icon.png) -66px 5px no-repeat; width:18px; height:21px;}
.duty{ background:url(/images/public_icon.png) -66px -18px no-repeat; width:18px; height:21px;} .duty{ background:url(/images/public_icon.png) -66px -18px no-repeat; width:18px; height:21px;}
.support{ background:url(/images/public_icon.png) -66px -45px no-repeat; width:18px; height:21px;} .support{ background:url(/images/public_icon.png) -66px -45px no-repeat; width:18px; height:21px;}
.function{ background:url(/images/public_icon.png) -66px -70px no-repeat; width:18px; height:21px;} /*.function{ background:url(/images/public_icon.png) -66px -70px no-repeat; width:18px; height:21px;}*/
.issues-function{ background:url(/images/public_icon.png) -66px -70px no-repeat; width:18px; height:21px;} .issues-function{ background:url(/images/public_icon.png) -66px -70px no-repeat; width:18px; height:21px;}
.weekly{ background:url(/images/public_icon.png) -66px -95px no-repeat; width:18px; height:21px;} .weekly{ background:url(/images/public_icon.png) -66px -95px no-repeat; width:18px; height:21px;}

View File

@ -61,7 +61,7 @@ table.filecontent th.line-num a {
table.filecontent td.line-code {padding: 0 0 0 4px;} table.filecontent td.line-code {padding: 0 0 0 4px;}
table.filecontent td.line-code pre { table.filecontent td.line-code pre {
margin: 0px; margin: 0px;
white-space: pre-wrap; /*white-space: pre-wrap;*/
font-family:"Liberation Mono", Courier, monospace; font-size:12px; font-family:"Liberation Mono", Courier, monospace; font-size:12px;
} }