competition
chenmin 11 years ago
commit 9e419876a9

@ -241,7 +241,7 @@ class AdminController < ApplicationController
end end
else else
respond_to do |format| respond_to do |format|
flash.now[:error] = "#{l :label_first_page_create_fail}: #{@first_page.errors.full_messages[0]}\n\t#{@contest_page.errors.full_messages[0]}" flash.now[:error] = "#{l :label_first_page_create_fail}: #{@first_page.errors.full_messages[0]}\n\t#{@contest_page.errors.full_messages[0]}\n\t#{@notification.errors.full_messages[0]}"
format.html { format.html {
render :action => 'contest_page_made' render :action => 'contest_page_made'
} }

@ -1,3 +1,4 @@
class ContestNotification < ActiveRecord::Base class ContestNotification < ActiveRecord::Base
attr_accessible :content, :title attr_accessible :content, :title
validates_length_of :title, maximum: 30
end end

@ -4,14 +4,16 @@
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %> <p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p> <span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> <p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp<span class="size"> <span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>&nbsp&nbsp&nbsp
<span class="size">
<% if @attachment!=nil&&@attachment.container_type == 'Document' %>
<%= link = link_to(l(:button_add), {:controller => 'code_review', <%= link = link_to(l(:button_add), {:controller => 'code_review',
:action => 'assign', :action_type => 'attachment', :action => 'assign', :action_type => 'attachment',
:id=>@attachment.project, :id=>@attachment.project,
:change_id => '', :attachment_id => @attachment.id, :change_id => '', :attachment_id => @attachment.id,
}, :class => 'icon icon-add') %> }, :class => 'icon icon-add') %>
<% end %>
</span></p> </span></p>
</div> </div>
&nbsp; &nbsp;
<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %> <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>

@ -4,11 +4,11 @@
<% line_num = 1 %> <% line_num = 1 %>
<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %> <% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
<tr> <tr>
<th class="line-num" id="L<%= line_num %>"> <th class="line-num" id="L<%= line_num %>" style="vertical-align: top;">
<a href="#L<%= line_num %>"><%= 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><%= line.html_safe %></pre> <pre style="width:880px;word-wrap: break-word; word-break: normal; "><%= line.html_safe %></pre>
</td> </td>
</tr> </tr>
<% line_num += 1 %> <% line_num += 1 %>

@ -1,4 +1,4 @@
<!-- added by bai --> <!-- added by bai -->
<div><%= l(:label_file_number) %> * 4 = <%= document_num(@project) %> * 4 = <%= format("%.2f" , document_score(@project)).to_i %></div> <div><%= l(:label_file_number) %> * 4 = <%= documents_num(@project) %> * 4 = <%= format("%.2f" , documents_score(@project)).to_i %></div>
<div><%= l(:label_file_score) %> = <%= format("%.2f" , document_score(@project)).to_i %></div> <div><%= l(:label_file_score) %> = <%= format("%.2f" , documents_score(@project)).to_i %></div>
<!-- end --> <!-- end -->

@ -45,8 +45,8 @@
</tr> </tr>
<tr> <tr>
<td style="width: 40%;text-align: right;font-size: 17px;color: rgb(17, 102, 153)"> <td style="width: 40%;text-align: right;font-size: 17px;color: rgb(17, 102, 153)">
<% #find_project_repository @project %> <!-- @project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count -->
<strong><%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %></strong> <strong><%= content_tag('span', "#{changesets_num(@project)}", :class => "info") %></strong>
</td> </td>
<td style="width: 60%;text-align: left"> <td style="width: 60%;text-align: left">
<%= content_tag('span', l(:label_commit_on)) %> <%= content_tag('span', l(:label_commit_on)) %>

@ -197,7 +197,7 @@
<span style="margin-top: -20px;float: right; display: block;"><%#= link_to l(:label_more_information), forums_path %></span> <span style="margin-top: -20px;float: right; display: block;"><%#= link_to l(:label_more_information), forums_path %></span>
<div style="height: 167px; padding-top:6px;"> <div style="height: 167px; padding-top:6px;">
<fieldset style="padding-left: 36px; margin-left: 13px; height: 150px; width:380px; border-radius:10px;"> <fieldset style="padding-left: 36px; margin-left: 13px; height: 150px; width:380px; border-radius:10px;">
<div style="font-size:14px; color: #1166AD; padding-left:52px; "><strong><%= @contestNotification.title %></strong></div> <div style="font-size:14px; color: #1166AD;text-align:center;word-break: break-all; "><strong style="margin:auto;"><%= @contestNotification.title %></strong></div>
<div class="underline-contests_four"></div> <div class="underline-contests_four"></div>
<div id="up_zzjs"> <div id="up_zzjs">
<div id="marqueebox"> <div id="marqueebox">

Loading…
Cancel
Save