Merge branch 'szzh' into develop
This commit is contained in:
commit
725c9559a6
|
@ -56,6 +56,8 @@ class AttachmentsController < ApplicationController
|
||||||
}
|
}
|
||||||
format.api
|
format.api
|
||||||
end
|
end
|
||||||
|
rescue Encoding::InvalidByteSequenceError => e
|
||||||
|
render :action => 'file'
|
||||||
end
|
end
|
||||||
|
|
||||||
def download
|
def download
|
||||||
|
|
|
@ -42,6 +42,7 @@ class ContestsController < ApplicationController
|
||||||
@offset, @limit = api_offset_and_limit(:limit => 10)
|
@offset, @limit = api_offset_and_limit(:limit => 10)
|
||||||
#@contests = Contest.visible
|
#@contests = Contest.visible
|
||||||
#@contests = @contests.like(params[:name]) if params[:name].present?
|
#@contests = @contests.like(params[:name]) if params[:name].present?
|
||||||
|
@is_search = params[:name] ? true:false
|
||||||
@contests = Contest.visible.where("name like '%#{params[:name]}%'")
|
@contests = Contest.visible.where("name like '%#{params[:name]}%'")
|
||||||
if params[:contests_search]
|
if params[:contests_search]
|
||||||
(redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
(redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<h3><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h3>
|
<h3><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h3>
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<div id="activity">
|
<div id="activity">
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||||
<h3></h3>
|
<h3></h3>
|
||||||
|
@ -13,7 +11,8 @@
|
||||||
<table width="660px" border="0" align="center">
|
<table width="660px" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top" width="50" >
|
<td colspan="2" valign="top" width="50" >
|
||||||
<img src="/images/new/user.jpg" width="40" height="40"/>
|
<!--img src="/images/new/user.jpg" width="40" height="40"/-->
|
||||||
|
<%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table width="580px" border="0">
|
<table width="580px" border="0">
|
||||||
|
@ -63,16 +62,6 @@
|
||||||
</div>
|
</div>
|
||||||
<%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
|
<%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
|
||||||
|
|
||||||
<div style="float:left;">
|
|
||||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
|
||||||
params.merge(:from => @date_to - @days - 1),
|
|
||||||
:title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %>
|
|
||||||
</div>
|
|
||||||
<div style="float:right;">
|
|
||||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
|
||||||
params.merge(:from => @date_to + @days - 1),
|
|
||||||
:title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %>
|
|
||||||
</div>
|
|
||||||
<% other_formats_links do |f| %>
|
<% other_formats_links do |f| %>
|
||||||
<%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
|
<%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<% end if @contest %>
|
<% end if @contest %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<br/>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,16 @@
|
||||||
</div>
|
</div>
|
||||||
<% if @contests.size > 0%>
|
<% if @contests.size > 0%>
|
||||||
<%= sort_contest(@s_state)%>
|
<%= sort_contest(@s_state)%>
|
||||||
<div id="bid-show">
|
<div id="bid-show" class="projects-index">
|
||||||
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% elsif @is_search%>
|
||||||
<%= render :partial => "layouts/no_content"%>
|
<%= render :partial => "layouts/no_content"%>
|
||||||
|
<% else %>
|
||||||
|
<%= sort_contest(@s_state)%>
|
||||||
|
<div id="bid-show" class="projects-index">
|
||||||
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% html_title l(:label_contest_list)%>
|
<% html_title l(:label_contest_list)%>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
<%= sort_course(@s_type, @school_id)%>
|
<%= sort_course(@s_type, @school_id)%>
|
||||||
|
|
||||||
<div id="courses-index">
|
<div id="courses-index" class="projects-index">
|
||||||
<%if @courses%>
|
<%if @courses%>
|
||||||
<%= render_course_hierarchy(@courses)%>
|
<%= render_course_hierarchy(@courses)%>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
style="word-break: break-all;word-wrap: break-word;">
|
style="word-break: break-all;word-wrap: break-word;">
|
||||||
<%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
|
<%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-content">
|
<div class="memo-content" id="memo-content_div">
|
||||||
<%= textAreailizable(@memo,:content) %>
|
<%= textAreailizable(@memo,:content) %>
|
||||||
<p>
|
<p>
|
||||||
<% if @memo.attachments.any?%>
|
<% if @memo.attachments.any?%>
|
||||||
|
@ -149,8 +149,17 @@
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
transpotUrl('.lz');
|
transpotUrl('.lz');
|
||||||
transpotUrl('.replies');
|
transpotUrl('.replies');
|
||||||
});
|
});
|
||||||
|
window.onready = function() {
|
||||||
|
var maxwidth = $("#memo-content_div").width();
|
||||||
|
$("#memo-content_div").children().each(function(){
|
||||||
|
if($(this).width()>maxwidth)
|
||||||
|
{
|
||||||
|
$(this).width(maxwidth);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
|
@ -31,7 +31,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= sort_project(@s_type, @project_type) %>
|
<%= sort_project(@s_type, @project_type) %>
|
||||||
<div id="projects-index">
|
<div id="projects-index" class="projects-index">
|
||||||
<%= render_project_hierarchy(@projects)%>
|
<%= render_project_hierarchy(@projects)%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both"></div>
|
<div style="clear: both"></div>
|
||||||
<div>
|
<div class="school-index">
|
||||||
<ul id="schoollist" style="line-height: 25px">
|
<ul id="schoollist" style="line-height: 25px">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,20 +1,26 @@
|
||||||
<%= form_tag({:action => 'edit', :tab => 'projects'}) do %>
|
<%= form_tag({:action => 'edit', :tab => 'projects'}) do %>
|
||||||
|
<div class="box tabular settings">
|
||||||
|
<p>
|
||||||
|
<%= setting_check_box :default_projects_public %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="box tabular settings">
|
<p>
|
||||||
<p><%= setting_check_box :default_projects_public %></p>
|
<%= setting_multiselect(:default_projects_modules,
|
||||||
|
Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p><%= setting_multiselect(:default_projects_modules,
|
<p>
|
||||||
Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %></p>
|
<%= setting_multiselect(:default_projects_tracker_ids, Tracker.sorted.all.collect {|t| [t.name, t.id.to_s]}) %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p><%= setting_multiselect(:default_projects_tracker_ids,
|
<p>
|
||||||
Tracker.sorted.all.collect {|t| [t.name, t.id.to_s]}) %></p>
|
<%= setting_check_box :sequential_project_identifiers %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p><%= setting_check_box :sequential_project_identifiers %></p>
|
<p style="display: none;"><%= setting_select :new_project_user_role_id, Role.find_all_givable.collect {|r| [r.name, r.id.to_s]},
|
||||||
|
:blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p><%= setting_select :new_project_user_role_id,
|
<%= submit_tag l(:button_save) %>
|
||||||
Role.find_all_givable.collect {|r| [r.name, r.id.to_s]},
|
|
||||||
:blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= submit_tag l(:button_save) %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="wiki wiki-page">
|
<div class="wiki wiki-page" id="wiki_content_div">
|
||||||
<%= textAreailizable content, :text, :attachments => content.page.attachments,
|
<%= textAreailizable content, :text, :attachments => content.page.attachments,
|
||||||
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
|
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
|
||||||
<%#= content.text.html_safe %>
|
<%#= content.text.html_safe %>
|
||||||
|
|
|
@ -1,27 +1,33 @@
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to(l(:label_history), {:action => 'history', :id => @page.title},
|
<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||||
:class => 'icon icon-history') %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= wiki_page_breadcrumb(@page) %>
|
<%= wiki_page_breadcrumb(@page) %>
|
||||||
|
|
||||||
<h3><%= h(@page.pretty_title) %></h3>
|
<h3>
|
||||||
|
<%= h(@page.pretty_title) %>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %>
|
<%= l(:label_version) %>
|
||||||
<em>(<%= @diff.content_from.author ?
|
<%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %>
|
||||||
@diff.content_from.author.name : l(:label_user_anonymous)
|
<em>
|
||||||
%>, <%= format_time(@diff.content_from.updated_on) %>)</em>
|
(<%= @diff.content_from.author ? @diff.content_from.author.name : l(:label_user_anonymous)%>,
|
||||||
|
<%= format_time(@diff.content_from.updated_on) %>)
|
||||||
|
</em>
|
||||||
→
|
→
|
||||||
<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'show',
|
<%= l(:label_version) %>
|
||||||
:id => @page.title, :project_id => @page.project,
|
<%= link_to @diff.content_to.version, :action => 'show',
|
||||||
:version => @diff.content_to.version
|
:id => @page.title, :project_id => @page.project,
|
||||||
%>/<%= @page.content.version %>
|
:version => @diff.content_to.version %>
|
||||||
<em>(<%= @diff.content_to.author ?
|
/
|
||||||
link_to_user(@diff.content_to.author.name) : l(:label_user_anonymous)
|
<%= @page.content.version %>
|
||||||
%>, <%= format_time(@diff.content_to.updated_on) %>)</em>
|
<em>
|
||||||
|
(<%= @diff.content_to.author ? link_to_user(@diff.content_to.author.name) : l(:label_user_anonymous)%>,
|
||||||
|
<%= format_time(@diff.content_to.updated_on) %>)
|
||||||
|
</em>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="text-diff" style=" width: 100%;word-break: break-all;word-wrap: break-word;">
|
<div class="text-diff" style=" width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||||
<%= simple_format_without_paragraph @diff.to_html %>
|
<%= simple_format_without_paragraph @diff.to_html %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,3 +68,15 @@
|
||||||
<%= render :partial => 'sidebar' %>
|
<%= render :partial => 'sidebar' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% html_title @page.pretty_title %>
|
<% html_title @page.pretty_title %>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.onready = function() {
|
||||||
|
var maxwidth = $("#wiki_content_div").width();
|
||||||
|
$("#wiki_content_div").children().each(function(){
|
||||||
|
if($(this).width()>maxwidth)
|
||||||
|
{
|
||||||
|
$(this).width(maxwidth);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -2832,3 +2832,6 @@ div.repos_explain{
|
||||||
}
|
}
|
||||||
|
|
||||||
.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}
|
.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}
|
||||||
|
|
||||||
|
.projects-index{min-height: 350px}
|
||||||
|
.school-index{min-height: 400px}
|
|
@ -864,7 +864,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-box-sizing: border-box;
|
-box-sizing: border-box;
|
||||||
min-height: 200px;
|
min-height: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue