Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
21c6f01d5f
|
@ -8,6 +8,7 @@ class CoursesController < ApplicationController
|
||||||
menu_item :overview
|
menu_item :overview
|
||||||
menu_item :feedback, :only => :feedback
|
menu_item :feedback, :only => :feedback
|
||||||
menu_item :homework, :only => :homework
|
menu_item :homework, :only => :homework
|
||||||
|
menu_item :new_homework
|
||||||
|
|
||||||
menu_item l(:label_sort_by_time), :only => :index
|
menu_item l(:label_sort_by_time), :only => :index
|
||||||
menu_item l(:label_sort_by_active), :only => :index
|
menu_item l(:label_sort_by_active), :only => :index
|
||||||
|
|
|
@ -44,7 +44,7 @@ class DocumentsController < ApplicationController
|
||||||
@grouped = documents.group_by {|d| d.title.first.upcase}
|
@grouped = documents.group_by {|d| d.title.first.upcase}
|
||||||
when 'author'
|
when 'author'
|
||||||
# @grouped = documents.select{|d| d.attachments.any?}.group_by {|d| d.attachments.last.author}
|
# @grouped = documents.select{|d| d.attachments.any?}.group_by {|d| d.attachments.last.author}
|
||||||
@grouped = documents.group_by {|d| d.user.name }
|
@grouped = documents.group_by(&:user)
|
||||||
else
|
else
|
||||||
@grouped = documents.group_by(&:category)
|
@grouped = documents.group_by(&:category)
|
||||||
end
|
end
|
||||||
|
|
|
@ -56,12 +56,12 @@ class SoftapplicationsController < ApplicationController
|
||||||
stars_status = stars_reates.select("stars, count(*) as scount").
|
stars_status = stars_reates.select("stars, count(*) as scount").
|
||||||
group("stars")
|
group("stars")
|
||||||
|
|
||||||
@stars_status_map = Hash.new(0.0)
|
@stars_status_map = Hash.new(0)
|
||||||
stars_status.each do |star_status|
|
stars_status.each do |star_status|
|
||||||
percent = percent_of(star_status.scount, stars_reates_count).to_f
|
percent = percent_of(star_status.scount, stars_reates_count).to_f
|
||||||
percent_m = format("%.2f", percent)
|
people = star_status.scount.to_i
|
||||||
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
|
@stars_status_map["star#{star_status.stars.to_i}".to_sym] =
|
||||||
percent_m.to_s + "%"
|
people.to_s
|
||||||
end
|
end
|
||||||
@jours = @softapplication.journals_for_messages.order('created_on DESC')
|
@jours = @softapplication.journals_for_messages.order('created_on DESC')
|
||||||
@image_results = []
|
@image_results = []
|
||||||
|
|
|
@ -137,6 +137,11 @@ class IssueQuery < Query
|
||||||
:type => :list_optional, :values => role_values
|
:type => :list_optional, :values => role_values
|
||||||
) unless role_values.empty?
|
) unless role_values.empty?
|
||||||
|
|
||||||
|
#done_values = [10,20,30,40,50,60,70,80,90,100]
|
||||||
|
#add_available_filter("done_ratio_111",
|
||||||
|
# :type => :list_optional, :values => done_values
|
||||||
|
#)
|
||||||
|
|
||||||
if versions.any?
|
if versions.any?
|
||||||
add_available_filter "fixed_version_id",
|
add_available_filter "fixed_version_id",
|
||||||
:type => :list_optional,
|
:type => :list_optional,
|
||||||
|
|
|
@ -26,7 +26,11 @@
|
||||||
<%= back_url_hidden_field_tag %>
|
<%= back_url_hidden_field_tag %>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><label for="username"><%=l(:lable_user_name)%>:</label></td>
|
<td align="right">
|
||||||
|
<label for="username">
|
||||||
|
<%=l(:lable_user_name)%>:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
|
<%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
|
||||||
:onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
|
:onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
|
||||||
|
@ -35,33 +39,48 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
|
<td align="right">
|
||||||
<td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
|
<label for="password">
|
||||||
|
<%=l(:field_password)%>:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
<%= password_field_tag 'password', nil, :tabindex => '2' %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if Setting.openid? %>
|
<% if Setting.openid? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
|
<td align="right">
|
||||||
<td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
|
<label for="openid_url">
|
||||||
|
<%=l(:field_identity_url)%>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
<%= text_field_tag "openid_url", nil, :tabindex => '3' %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<% if Setting.autologin? %>
|
<% if Setting.autologin? %>
|
||||||
<label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
|
<label for="autologin">
|
||||||
|
<%= check_box_tag 'autologin', 1, false, :tabindex => 4 %>
|
||||||
|
<%= l(:label_stay_logged_in) %>
|
||||||
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" >
|
<td colspan="2" >
|
||||||
|
|
||||||
<span style="float: left"><% if Setting.lost_password? %>
|
<span style="float: left">
|
||||||
|
<% if Setting.lost_password? %>
|
||||||
<%= link_to l(:label_password_lost), lost_password_path %>
|
<%= link_to l(:label_password_lost), lost_password_path %>
|
||||||
<% end %></span>
|
<% end %></span>
|
||||||
|
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
<input type="submit" class="small" name="login" value="<%=l(:button_login)%> »" tabindex="5"/></span>
|
<input type="submit" class="small" name="login" value="<%=l(:button_login)%> »" tabindex="5"/></span>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -1,31 +1,36 @@
|
||||||
<!-- <%#= course_board_breadcrumb(@board) %> -->
|
<script type="text/javascript">
|
||||||
|
function submitCoursesBoard()
|
||||||
<!--new and follow-->
|
{
|
||||||
<!-- <div class="content-title-top">
|
if(regexSubject()&®exContent())
|
||||||
<%#= link_to l(:label_message_new),
|
{
|
||||||
new_board_message_path(@board),
|
$("#message-form").submit();
|
||||||
:class => 'icon icon-add',
|
}
|
||||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
|
}
|
||||||
<!-- <%#= watcher_link(@board, User.current) %> -->
|
</script>
|
||||||
<!-- </div> -->
|
|
||||||
<div id="add-message" class="add_frame" style="display:none;">
|
<div id="add-message" class="add_frame" style="display:none;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<h3><%= link_to h(@board.name), course_board_path(@course, @board) %> » <%= l(:label_message_new) %></h3>
|
<h3>
|
||||||
|
<%= link_to h(@board.name), course_board_path(@course, @board) %> »
|
||||||
|
<%= l(:label_message_new) %>
|
||||||
|
</h3>
|
||||||
<div class="add_frame_header" >
|
<div class="add_frame_header" >
|
||||||
<%= l(:label_message_new) %>
|
<%= l(:label_message_new) %>
|
||||||
</div>
|
</div>
|
||||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
<p>
|
||||||
<%#= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
|
<input type="button" onclick="submitCoursesBoard();" class = "whiteButton m3p10 h30" value="<%= l(:button_submit)%>">
|
||||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--display the board-->
|
<!--display the board-->
|
||||||
<div class="borad-title"><%=h @board.name %></div>
|
<div class="borad-title">
|
||||||
|
<%=h @board.name %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if !User.current.logged?%>
|
<% if !User.current.logged?%>
|
||||||
<div style="font-size: 14px;margin:20px;">
|
<div style="font-size: 14px;margin:20px;">
|
||||||
|
@ -35,9 +40,12 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- <div class="borad-description"><%=h @board.description %></div> -->
|
|
||||||
<div class="borad-setitle">
|
<div class="borad-setitle">
|
||||||
<span class="borad-topic-count">共有 <%=link_to @topic_count,:controller => 'boards',:action => 'index' %> 个贴子</span>
|
<span class="borad-topic-count">
|
||||||
|
共有
|
||||||
|
<%=link_to @topic_count,:controller => 'boards',:action => 'index' %>
|
||||||
|
个贴子
|
||||||
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<%= link_to l(:label_message_new),
|
<%= link_to l(:label_message_new),
|
||||||
new_board_message_path(@board),
|
new_board_message_path(@board),
|
||||||
|
@ -47,15 +55,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top: 10px">
|
<div style="padding-top: 10px">
|
||||||
<% if @topics.any? %>
|
<% if @topics.any? %>
|
||||||
<!-- <table class="list messages">
|
|
||||||
<thead><tr>
|
|
||||||
<th><%= l(:field_subject) %></th>
|
|
||||||
<th><%= l(:field_author) %></th>
|
|
||||||
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
|
||||||
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
|
||||||
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
|
||||||
</tr></thead>
|
|
||||||
<tbody> -->
|
|
||||||
<% @topics.each do |topic| %>
|
<% @topics.each do |topic| %>
|
||||||
<table class="content-text-list">
|
<table class="content-text-list">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -64,36 +63,44 @@
|
||||||
<table width="640px" border="0">
|
<table width="640px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
|
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
|
||||||
<%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s %>
|
<%= topic.locked? ? 'locked' : '' %>">
|
||||||
|
<%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s %>
|
||||||
|
</td>
|
||||||
|
<td align="right" rowspan="3">
|
||||||
|
<table class="borad-count">
|
||||||
|
<tr>
|
||||||
|
<td align="center" class="borad-count-digit">
|
||||||
|
<%=link_to (topic.replies_count), board_message_path(@board, topic) %>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" rowspan="3"><table class="borad-count"><tr><td align="center" class="borad-count-digit"><%=link_to (topic.replies_count), board_message_path(@board, topic) %></td></tr>
|
|
||||||
<tr><td align="center">回答</td></tr>
|
|
||||||
</table></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr><td colspan="2" ><span class="font_description">标签</span></td></tr> -->
|
<tr>
|
||||||
<tr><td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_on, topic.author %><br /></span></td></tr>
|
<td align="center">
|
||||||
</table></td>
|
回答
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
|
||||||
<td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
|
||||||
<td class="author"><%= link_to_user(topic.author) %></td>
|
|
||||||
<td class="created_on"><%= format_time(topic.created_on) %></td>
|
|
||||||
<td class="reply-count"><%= topic.replies_count %></td>
|
|
||||||
<td class="last_message">
|
|
||||||
<% if topic.last_reply %>
|
|
||||||
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
|
|
||||||
<%= link_to_message topic.last_reply %>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr> -->
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left" colspan="2" >
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= authoring topic.created_on, topic.author %>
|
||||||
|
<br />
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- </tbody>
|
<div class="pagination">
|
||||||
</table> -->
|
<%= pagination_links_full @topic_pages, @topic_count %>
|
||||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<p class="nodata">
|
||||||
|
<%= l(:label_no_data) %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<%= error_messages_for @board %>
|
<%= error_messages_for @board %>
|
||||||
|
|
||||||
<div class="box tabular">
|
<div class="box tabular">
|
||||||
<p style="width:666;"><%= f.text_field :name, :required => true %></p><!--by young-->
|
<p style="width:666;">
|
||||||
<p><%= f.text_field :description, :required => true, :size => 30 %></p><!--by young-->
|
<%= f.text_field :name, :required => true %>
|
||||||
|
</p><!--by young-->
|
||||||
|
<p>
|
||||||
|
<%= f.text_field :description, :required => true, :size => 30 %>
|
||||||
|
</p><!--by young-->
|
||||||
<% if @board.valid_parents.any? %>
|
<% if @board.valid_parents.any? %>
|
||||||
<p><%= f.select :parent_id, boards_options_for_select(@board.valid_parents), :include_blank => true, :label => :field_board_parent %></p>
|
<p>
|
||||||
|
<%= f.select :parent_id, boards_options_for_select(@board.valid_parents), :include_blank => true, :label => :field_board_parent %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,25 +1,24 @@
|
||||||
<!-- <%#= board_breadcrumb(@board) %> -->
|
<script type="text/javascript">
|
||||||
|
function submitProjectBoard()
|
||||||
<!--new and follow-->
|
{
|
||||||
<!-- <div class="content-title-top">
|
if(regexSubject()&®exContent())
|
||||||
<%#= link_to l(:label_message_new),
|
{
|
||||||
new_board_message_path(@board),
|
$("#message-form").submit();
|
||||||
:class => 'icon icon-add',
|
}
|
||||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
|
}
|
||||||
<!-- <%#= watcher_link(@board, User.current) %> -->
|
</script>
|
||||||
<!-- </div> -->
|
|
||||||
<div id="add-message" class="add_frame" style="display:none;">
|
<div id="add-message" class="add_frame" style="display:none;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h3>
|
<h3>
|
||||||
|
<%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %>
|
||||||
|
</h3>
|
||||||
<div class="add_frame_header">
|
<div class="add_frame_header">
|
||||||
<%= l(:label_message_new) %>
|
<%= l(:label_message_new) %>
|
||||||
</div>
|
</div>
|
||||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
<p>
|
||||||
<%#= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
<input type="button" onclick="submitProjectBoard();" class = "whiteButton m3p10 h30" value="<%= l(:button_submit)%>">
|
||||||
|
|
||||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
|
@ -27,7 +26,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--display the board-->
|
<!--display the board-->
|
||||||
<div class="borad-title"><%= h @board.name %></div>
|
<div class="borad-title">
|
||||||
|
<%= h @board.name %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if !User.current.logged? %>
|
<% if !User.current.logged? %>
|
||||||
<div style="font-size: 14px;margin:20px;">
|
<div style="font-size: 14px;margin:20px;">
|
||||||
|
@ -40,10 +41,12 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- <div class="borad-description"><%= h @board.description %></div> -->
|
|
||||||
<div class="borad-setitle">
|
<div class="borad-setitle">
|
||||||
<span class="borad-topic-count">共有 <%= link_to @topic_count,:controller => 'boards',:action => 'index' %> 个贴子</span>
|
<span class="borad-topic-count">
|
||||||
|
共有
|
||||||
|
<%= link_to @topic_count,:controller => 'boards',:action => 'index' %>
|
||||||
|
个贴子
|
||||||
|
</span>
|
||||||
<% if @project.enabled_modules.where("name = 'boards'").count > 0 %>
|
<% if @project.enabled_modules.where("name = 'boards'").count > 0 %>
|
||||||
<span>
|
<span>
|
||||||
<%= link_to l(:label_message_new),
|
<%= link_to l(:label_message_new),
|
||||||
|
@ -55,15 +58,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
<div style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||||
<% if @topics.any? %>
|
<% if @topics.any? %>
|
||||||
<!-- <table class="list messages">
|
|
||||||
<thead><tr>
|
|
||||||
<th><%= l(:field_subject) %></th>
|
|
||||||
<th><%= l(:field_author) %></th>
|
|
||||||
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
|
||||||
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
|
|
||||||
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
|
|
||||||
</tr></thead>
|
|
||||||
<tbody> -->
|
|
||||||
<% @topics.each do |topic| %>
|
<% @topics.each do |topic| %>
|
||||||
<table class="content-text-list">
|
<table class="content-text-list">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -88,7 +82,6 @@
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr><td colspan="2" ><span class="font_description">标签</span></td></tr> -->
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" colspan="2">
|
<td align="left" colspan="2">
|
||||||
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
|
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
|
||||||
|
@ -97,23 +90,10 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
|
|
||||||
<td class="subject"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
|
||||||
<td class="author"><%= link_to_user(topic.author) %></td>
|
|
||||||
<td class="created_on"><%= format_time(topic.created_on) %></td>
|
|
||||||
<td class="reply-count"><%= topic.replies_count %></td>
|
|
||||||
<td class="last_message">
|
|
||||||
<% if topic.last_reply %>
|
|
||||||
<%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
|
|
||||||
<%= link_to_message topic.last_reply %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
<div class="pagination">
|
||||||
</tr> -->
|
<%= pagination_links_full @topic_pages, @topic_count %>
|
||||||
<% end %>
|
</div>
|
||||||
<!-- </tbody>
|
|
||||||
</table> -->
|
|
||||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -3,14 +3,26 @@
|
||||||
<%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %>
|
<%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<h3 style="padding-top:0px;"><%= l(:label_board_plural) %></h3>
|
<h3 style="padding-top:0px;">
|
||||||
|
<%= l(:label_board_plural) %>
|
||||||
|
</h3>
|
||||||
<table class="list boards">
|
<table class="list boards">
|
||||||
<thead><tr>
|
<thead>
|
||||||
<th><%= l(:label_board) %></th>
|
<tr>
|
||||||
<th><%= l(:label_topic_plural) %></th>
|
<th>
|
||||||
<th><%= l(:label_message_plural) %></th>
|
<%= l(:label_board) %>
|
||||||
<th><%= l(:label_message_last) %></th>
|
</th>
|
||||||
</tr></thead>
|
<th>
|
||||||
|
<%= l(:label_topic_plural) %>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<%= l(:label_message_plural) %>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<%= l(:label_message_last) %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% Board.board_tree(@boards) do |board, level| %>
|
<% Board.board_tree(@boards) do |board, level| %>
|
||||||
<tr class="<%= cycle 'odd', 'even' %>">
|
<tr class="<%= cycle 'odd', 'even' %>">
|
||||||
|
@ -18,8 +30,12 @@
|
||||||
<%= link_to h(board.name), project_board_path(board.project, board), :class => "board" %><br />
|
<%= link_to h(board.name), project_board_path(board.project, board), :class => "board" %><br />
|
||||||
<%=h board.description %>
|
<%=h board.description %>
|
||||||
</td>
|
</td>
|
||||||
<td class="topic-count"><%= board.topics_count %></td>
|
<td class="topic-count">
|
||||||
<td class="message-count"><%= board.messages_count %></td>
|
<%= board.topics_count %>
|
||||||
|
</td>
|
||||||
|
<td class="message-count">
|
||||||
|
<%= board.messages_count %>
|
||||||
|
</td>
|
||||||
<td class="last-message">
|
<td class="last-message">
|
||||||
<% if board.last_message %>
|
<% if board.last_message %>
|
||||||
<%= authoring board.last_message.created_on, board.last_message.author %><br />
|
<%= authoring board.last_message.created_on, board.last_message.author %><br />
|
||||||
|
|
|
@ -1,18 +1,25 @@
|
||||||
<!-- <h4><%= link_to h(document.title), document_path(document) %></h4>
|
|
||||||
<p><em><%= format_time(document.updated_on) %></em></p>
|
|
||||||
|
|
||||||
<div class="wiki">
|
|
||||||
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!--add by huang-->
|
<!--add by huang-->
|
||||||
<table width="660px" align="center">
|
<table width="660px" align="center">
|
||||||
<tr><td class="font_title_document"><%= link_to h(document.title), document_path(document) %></td></tr>
|
<tr>
|
||||||
<tr><td colspan="2">
|
<td class="font_title_document">
|
||||||
|
<%= link_to h(document.title), document_path(document) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
<div class="font_description">
|
<div class="font_description">
|
||||||
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
||||||
</div>
|
</div>
|
||||||
</td></tr>
|
</td>
|
||||||
<tr><td align="right"><p class="font_lighter"><%= format_time(document.updated_on) %></p></td></tr>
|
</tr>
|
||||||
<tr><td class="line_under"></td></tr>
|
<tr>
|
||||||
|
<td align="right">
|
||||||
|
<p class="font_lighter">
|
||||||
|
<%= format_time(document.updated_on) %>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="line_under"></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -12,23 +12,34 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="add-document" style="display:none;">
|
<div id="add-document" style="display:none;">
|
||||||
<h3><%=l(:label_document_new)%></h3>
|
<h3>
|
||||||
<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
<%=l(:label_document_new)%>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
</h3>
|
||||||
<p>
|
<%= labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
||||||
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
|
<p>
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3><%=l(:label_document_plural)%></h3>
|
<h3><%=l(:label_document_plural)%></h3>
|
||||||
|
|
||||||
<% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
|
<% if @grouped.empty? %>
|
||||||
|
<p class="nodata">
|
||||||
|
<%= l(:label_no_data) %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% @grouped.keys.sort.each do |group| %>
|
<% if @grouped.has_key? nil %>
|
||||||
<!-- <h3><%= group %></h3> -->
|
<% @grouped.keys.each do |group| %>
|
||||||
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
|
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% @grouped.keys.sort.each do |group| %>
|
||||||
|
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% html_title(l(:label_document_plural)) -%>
|
<% html_title(l(:label_document_plural)) -%>
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding-left: 8px; width:60px">
|
<td valign="top" style="padding-left: 8px; width:62px">
|
||||||
<%= l(:label_main_teacher) %> :
|
<%= l(:label_main_teacher) %> :
|
||||||
</td>
|
</td>
|
||||||
<td class="font_lighter_sidebar">
|
<td class="font_lighter_sidebar">
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/** {
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
-box-sizing: border-box;
|
|
||||||
}*/
|
|
||||||
.lz {
|
.lz {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
@ -60,7 +55,9 @@
|
||||||
</style>
|
</style>
|
||||||
<div class="lz">
|
<div class="lz">
|
||||||
<!-- 在这里添加赞和踩-->
|
<!-- 在这里添加赞和踩-->
|
||||||
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
<span id="praise_tread" style="float: right">
|
||||||
|
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||||
|
</span>
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= watcher_link(@topic, User.current) %>
|
<%= watcher_link(@topic, User.current) %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
@ -103,12 +100,14 @@
|
||||||
<div class="memo-content">
|
<div class="memo-content">
|
||||||
<%= textilizable(@topic, :content) %>
|
<%= textilizable(@topic, :content) %>
|
||||||
<%= link_to_attachments @topic, :author => false %>
|
<%= link_to_attachments @topic, :author => false %>
|
||||||
<%# options = {:author => true, :deletable => @topic.author.eql?(User.current)} %>
|
|
||||||
<%#= render :partial => 'attachments/app_link', :locals => {:attachments => @topi.attachments, :options => options} %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-timestamp">
|
<div class="memo-timestamp">
|
||||||
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>
|
<div style="float: left">
|
||||||
<div style="float: right"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></div>
|
<%= authoring @topic.created_on, @topic.author %>
|
||||||
|
</div>
|
||||||
|
<div style="float: right">
|
||||||
|
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
@ -119,15 +118,19 @@
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
|
<h3 class="comments">
|
||||||
|
<%= l(:label_reply_plural) %>
|
||||||
|
(<%= @reply_count %>)
|
||||||
|
</h3>
|
||||||
<% reply_count = 0 %>
|
<% reply_count = 0 %>
|
||||||
<% @replies.each do |message| %>
|
<% @replies.each do |message| %>
|
||||||
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
||||||
|
|
||||||
<table class="borad-text-list">
|
<table class="borad-text-list">
|
||||||
<tr>
|
<tr>
|
||||||
<!--<td class="font_lighter"> </td> -->
|
<td rowspan="3" valign="top" width="60px">
|
||||||
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
|
<%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="contextual-borad">
|
<div class="contextual-borad">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
@ -157,12 +160,14 @@
|
||||||
<td class="comments">
|
<td class="comments">
|
||||||
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||||
<%= textilizable message,:content,:attachments => message.attachments %>
|
<%= textilizable message,:content,:attachments => message.attachments %>
|
||||||
<%#= message.content.html_safe %>
|
|
||||||
</div>
|
</div>
|
||||||
<%= link_to_attachments message, :author => false %> </td>
|
<%= link_to_attachments message, :author => false %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font_lighter" style="float: left"><%= authoring message.created_on, message.author %></td>
|
<td class="font_lighter" style="float: left">
|
||||||
|
<%= authoring message.created_on, message.author %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -174,12 +179,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
|
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
|
||||||
<div id="reply" style="display:none;">
|
<div id="reply" style="display:none;">
|
||||||
|
|
||||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
||||||
<%#= submit_tag l(:button_submit) %>
|
<input type="button" class="enterprise" value="<%=l(:button_submit) %>" onclick="submit_message_replay();" >
|
||||||
<input type="button" class="enterprise" value="<%=l(:button_submit) %>" onmousemove="regexContent()" onclick="submit_message_replay();" >
|
|
||||||
<%#= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,7 +190,7 @@
|
||||||
<% html_title @topic.subject %>
|
<% html_title @topic.subject %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var flag = false
|
var flag = false;
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
transpotUrl('#content');
|
transpotUrl('#content');
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,48 +1,86 @@
|
||||||
<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
<script type="text/javascript">
|
||||||
|
function regexSubject()
|
||||||
|
{
|
||||||
|
var content = $.trim($("#message_subject").val());
|
||||||
|
if(content.length ==0)
|
||||||
|
{
|
||||||
|
$("#subject_span").text("<%= l(:label_subject_empty) %>");
|
||||||
|
$("#subject_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#subject_span").text("<%= l(:label_field_correct) %>");
|
||||||
|
$("#subject_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function regexContent()
|
||||||
|
{
|
||||||
|
var content = $.trim($("#message_content").val());
|
||||||
|
if(content.length ==0)
|
||||||
|
{
|
||||||
|
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
||||||
|
$("#message_content_span").css('color','#ff0000');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
||||||
|
$("#message_content_span").css('color','#008000');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<%= error_messages_for 'message' %>
|
<%= error_messages_for 'message' %>
|
||||||
<% replying ||= false %>
|
<% replying ||= false %>
|
||||||
|
|
||||||
<div class="box ph10_5">
|
<div class="box ph10_5">
|
||||||
<!--[form:message]-->
|
<!--[form:message]-->
|
||||||
<% extra_option = replying ? { readonly: true} : { maxlength: 254 } %>
|
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
|
||||||
<p>
|
<p>
|
||||||
<label for="message_subject">
|
<label for="message_subject">
|
||||||
<%= l(:field_subject) %>
|
<%= l(:field_subject) %>
|
||||||
<span class="required"> * </span>
|
<span class="required"> * </span>
|
||||||
</label>
|
</label>
|
||||||
<br/>
|
<br/>
|
||||||
|
<% if replying %>
|
||||||
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
|
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
|
||||||
|
<% else %>
|
||||||
|
<%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject", onblur: "regexSubject();" }.merge(extra_option) %>
|
||||||
|
<% end %>
|
||||||
|
<span id="subject_span"></span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<% unless replying %>
|
<% unless replying %>
|
||||||
<% if @message.safe_attribute? 'sticky' %>
|
<% if @message.safe_attribute? 'sticky' %>
|
||||||
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
<%= f.check_box :sticky %>
|
||||||
|
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @message.safe_attribute? 'locked' %>
|
<% if @message.safe_attribute? 'locked' %>
|
||||||
<%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
|
<%= f.check_box :locked %>
|
||||||
|
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="message_subject"><%= l(:field_description) %>
|
<label for="message_subject">
|
||||||
<span class="required"> * </span></label>
|
<%= l(:field_description) %>
|
||||||
|
<span class="required"> * </span>
|
||||||
|
</label>
|
||||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();" %>
|
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();", :maxlength => 5000 %>
|
||||||
<span id="message_content_span"></span>
|
<span id="message_content_span"></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!--[eoform:message]-->
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= l(:label_attachment_plural) %>
|
<%= l(:label_attachment_plural) %>
|
||||||
<br />
|
<br />
|
||||||
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
|
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<%#= wikitoolbar_for 'message_content' %>
|
|
|
@ -1,9 +1,4 @@
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/** {
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
-box-sizing: border-box;
|
|
||||||
}*/
|
|
||||||
.lz {
|
.lz {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
@ -63,7 +58,9 @@
|
||||||
|
|
||||||
<div class="lz">
|
<div class="lz">
|
||||||
<!-- 在这里添加赞和踩-->
|
<!-- 在这里添加赞和踩-->
|
||||||
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
<span id="praise_tread" style="float: right">
|
||||||
|
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||||
|
</span>
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= watcher_link(@topic, User.current) %>
|
<%= watcher_link(@topic, User.current) %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
@ -98,9 +95,11 @@
|
||||||
<div class="memo-section" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
<div class="memo-section" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="width: 53%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="width: 53%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
<% if @project %>
|
<% if @project %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project),title: @topic.subject.to_s %>
|
<%= label_tag l(:field_subject) %>:
|
||||||
|
<%= link_to @topic.subject, project_boards_path(@topic.project),title: @topic.subject.to_s %>
|
||||||
<% elsif @course %>
|
<% elsif @course %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course),title: @topic.subject.to_s %>
|
<%= label_tag l(:field_subject) %>:
|
||||||
|
<%= link_to @topic.subject, course_boards_path(@topic.course),title: @topic.subject.to_s %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-content">
|
<div class="memo-content">
|
||||||
|
@ -108,15 +107,13 @@
|
||||||
<%= link_to_attachments @topic, :author => false %>
|
<%= link_to_attachments @topic, :author => false %>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-timestamp">
|
<div class="memo-timestamp">
|
||||||
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>
|
<div style="float: left">
|
||||||
|
<%= authoring @topic.created_on, @topic.author %>
|
||||||
|
</div>
|
||||||
<div style="float: right"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></div>
|
<div style="float: right">
|
||||||
|
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
@ -130,11 +127,11 @@
|
||||||
<% reply_count = 0 %>
|
<% reply_count = 0 %>
|
||||||
<% @replies.each do |message| %>
|
<% @replies.each do |message| %>
|
||||||
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
<div class="message reply" id="<%= "message-#{message.id}" %>">
|
||||||
|
|
||||||
<table class="borad-text-list">
|
<table class="borad-text-list">
|
||||||
<tr>
|
<tr>
|
||||||
<!--<td class="font_lighter"> </td> -->
|
<td rowspan="3" valign="top" width="60px">
|
||||||
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
|
<%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="contextual-borad">
|
<div class="contextual-borad">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
@ -164,37 +161,58 @@
|
||||||
<td class="comments">
|
<td class="comments">
|
||||||
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||||
<%= textilizable message,:content,:attachments => message.attachments %>
|
<%= textilizable message,:content,:attachments => message.attachments %>
|
||||||
<%#= message.content.html_safe %>
|
|
||||||
</div>
|
</div>
|
||||||
<%= link_to_attachments message, :author => false %> </td>
|
<%= link_to_attachments message, :author => false %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="font_lighter" style="float: left"><%= authoring message.created_on, message.author %></td>
|
<td class="font_lighter" style="float: left">
|
||||||
|
<%= authoring message.created_on, message.author %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
|
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||||
<div id="reply" style="display:none;">
|
<div id="reply" style="display:none;">
|
||||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
||||||
<%= submit_tag l(:button_submit) %>
|
<input type="button" class="enterprise" value="<%=l(:button_submit) %>" onclick="submit_message_replay();" >
|
||||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% html_title @topic.subject %>
|
<% html_title @topic.subject %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var flag = false;
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
transpotUrl('#content');
|
transpotUrl('#content');
|
||||||
});
|
});
|
||||||
|
function submit_message_replay()
|
||||||
|
{
|
||||||
|
if(flag)
|
||||||
|
{
|
||||||
|
$("#message-form").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function regexContent()
|
||||||
|
{
|
||||||
|
var content = $.trim($("#message_content").val());
|
||||||
|
if(content.length ==0)
|
||||||
|
{
|
||||||
|
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
||||||
|
$("#message_content_span").css('color','#ff0000');
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
||||||
|
$("#message_content_span").css('color','#008000');
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -35,7 +35,9 @@
|
||||||
<%= call_hook(:view_my_account_contextual, :user => @user) %>
|
<%= call_hook(:view_my_account_contextual, :user => @user) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
<h3 style="padding-left: 10px;">
|
||||||
|
<%= l(:label_my_account) %>
|
||||||
|
</h3>
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
<fieldset class="box" style="margin:10px;">
|
<fieldset class="box" style="margin:10px;">
|
||||||
<%= labelled_form_for :user, @user,
|
<%= labelled_form_for :user, @user,
|
||||||
|
@ -68,17 +70,22 @@
|
||||||
<span id='name' style='display:none'>
|
<span id='name' style='display:none'>
|
||||||
<p style="width:530px;padding-left: 26px;">
|
<p style="width:530px;padding-left: 26px;">
|
||||||
<%= f.text_field :lastname, :required => true %>
|
<%= f.text_field :lastname, :required => true %>
|
||||||
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
<span class='font_lighter'>
|
||||||
|
<%= l(:field_lastname_eg) %>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p style="width:530px;padding-left: 26px;">
|
<p style="width:530px;padding-left: 26px;">
|
||||||
<%= f.text_field :firstname, :required => true %>
|
<%= f.text_field :firstname, :required => true %>
|
||||||
<span class='font_lighter'><%= l(:field_firstname_eg) %></span>
|
<span class='font_lighter'>
|
||||||
|
<%= l(:field_firstname_eg) %>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span id='enterprise' style='display:none'>
|
<span id='enterprise' style='display:none'>
|
||||||
<p style="width:400px;padding-left: 26px;">
|
<p style="width:400px;padding-left: 26px;">
|
||||||
<%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
<%= l(:label_company_name)%>
|
||||||
|
<%= text_field_tag :enterprise_name, @user.firstname %>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -171,6 +178,7 @@
|
||||||
<% city = User.current.user_extensions.location_city %>
|
<% city = User.current.user_extensions.location_city %>
|
||||||
<% identity = User.current.user_extensions.identity %>
|
<% identity = User.current.user_extensions.identity %>
|
||||||
<% title = User.current.user_extensions.technical_title %>
|
<% title = User.current.user_extensions.technical_title %>
|
||||||
|
<% language = User.current.language %>
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
$().ready(function () {
|
$().ready(function () {
|
||||||
var province = "<%= "#{province}" %>"
|
var province = "<%= "#{province}" %>"
|
||||||
|
@ -178,7 +186,8 @@
|
||||||
init_province_and_city(document.getElementById('userProvince'), province, document.getElementById('userCity'), city);
|
init_province_and_city(document.getElementById('userProvince'), province, document.getElementById('userCity'), city);
|
||||||
var identity = "<%= "#{identity}" %>"
|
var identity = "<%= "#{identity}" %>"
|
||||||
var title = "<%= "#{title}" %>"
|
var title = "<%= "#{title}" %>"
|
||||||
init_identity_and_title(document.getElementById('userIdentity'), identity, document.getElementById('userTechnical_title'), title);
|
var language = "<%= "#{language}" %>"
|
||||||
|
init_identity_and_title(document.getElementById('userIdentity'), identity, document.getElementById('userTechnical_title'), title, language);
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -230,11 +239,19 @@
|
||||||
<% unless @user.user_extensions.identity == 2 %>
|
<% unless @user.user_extensions.identity == 2 %>
|
||||||
<p style="width:400px;padding-left: 26px;">
|
<p style="width:400px;padding-left: 26px;">
|
||||||
<%= l(:label_identity) %>
|
<%= l(:label_identity) %>
|
||||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
<option value="">
|
||||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
<%= l(:label_account_identity_choose) %>
|
||||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
</option>
|
||||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
<option value="0">
|
||||||
|
<%= l(:label_account_identity_teacher) %>
|
||||||
|
</option>
|
||||||
|
<option value="1">
|
||||||
|
<%= l(:label_account_identity_student) %>
|
||||||
|
</option>
|
||||||
|
<option value="3">
|
||||||
|
<%= l(:label_account_identity_developer) %>
|
||||||
|
</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<span id='technical_title' style='display:none'>
|
<span id='technical_title' style='display:none'>
|
||||||
|
@ -254,11 +271,21 @@
|
||||||
<p>
|
<p>
|
||||||
<span style="display:none">
|
<span style="display:none">
|
||||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
<option value="">
|
||||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
<%= l(:label_account_identity_choose) %>
|
||||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
</option>
|
||||||
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
<option value="0">
|
||||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
<%= l(:label_account_identity_teacher) %>
|
||||||
|
</option>
|
||||||
|
<option value="1">
|
||||||
|
<%= l(:label_account_identity_student) %>
|
||||||
|
</option>
|
||||||
|
<option value="2">
|
||||||
|
<%= l(:label_account_identity_enterprise) %>
|
||||||
|
</option>
|
||||||
|
<option value="3">
|
||||||
|
<%= l(:label_account_identity_developer) %>
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -267,7 +294,9 @@
|
||||||
|
|
||||||
|
|
||||||
<% if Setting.openid? %>
|
<% if Setting.openid? %>
|
||||||
<p> <%= f.text_field :identity_url %> </p>
|
<p>
|
||||||
|
<%= f.text_field :identity_url %>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
||||||
|
@ -499,15 +528,55 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function init_identity_and_title(pField, identity, cField, title) {
|
function init_identity_and_title(pField, identity, cField, title, language) {
|
||||||
for (var i = 0; i < pField.options.length; i++) {
|
for (var i = 0; i < pField.options.length; i++) {
|
||||||
if (pField.options[i].value == identity) {
|
if (pField.options[i].value == identity) {
|
||||||
pField.selectedIndex = i;
|
pField.selectedIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showtechnical_title(identity, cField);
|
showtechnical_title(identity, cField);
|
||||||
|
|
||||||
|
if(language == 'zh') {
|
||||||
|
switch (title) {
|
||||||
|
case 'Professor' :
|
||||||
|
title1 = '教授';
|
||||||
|
break;
|
||||||
|
case 'Associate professor' :
|
||||||
|
title1 = '副教授';
|
||||||
|
break;
|
||||||
|
case 'Lecturer' :
|
||||||
|
title1 = '讲师';
|
||||||
|
break;
|
||||||
|
case 'Teaching assistant' :
|
||||||
|
title1 = '助教';
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
title1 = title;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (title) {
|
||||||
|
case '教授' :
|
||||||
|
title1 = 'Professor';
|
||||||
|
break;
|
||||||
|
case '副教授' :
|
||||||
|
title1 = 'Associate professor';
|
||||||
|
break;
|
||||||
|
case '讲师' :
|
||||||
|
title1 = 'Lecturer';
|
||||||
|
break;
|
||||||
|
case '助教' :
|
||||||
|
title1 = 'Teaching assistant';
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
title1 = title;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < cField.options.length; i++) {
|
for (var i = 0; i < cField.options.length; i++) {
|
||||||
if (cField.options[i].value == title) {
|
if (cField.options[i].value == title1) {
|
||||||
cField.selectedIndex = i;
|
cField.selectedIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% for version in @project.shared_versions.sort %>
|
<% for version in @project.shared_versions.sort %>
|
||||||
<tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
|
<tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
|
||||||
<td class="name">
|
<td class="name" title="<%= link_to_version version %>">
|
||||||
<%= link_to_version version %>
|
<%= link_to_version version %>
|
||||||
</td>
|
</td>
|
||||||
<td class="date">
|
<td class="date">
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
<%= javascript_tag do %>
|
<%= javascript_tag do %>
|
||||||
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
||||||
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
||||||
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
||||||
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
||||||
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
initFilters();
|
initFilters();
|
||||||
<% query.filters.each do |field, options| %>
|
<% query.filters.each do |field, options| %>
|
||||||
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
||||||
<% end %>
|
<% end %>
|
||||||
});
|
});
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<table style="width:100%">
|
<table style="width:100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table id="filters-table">
|
<table id="filters-table">
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="add-filter">
|
<td class="add-filter">
|
||||||
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
||||||
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<%= hidden_field_tag 'f[]', '' %>
|
<%= hidden_field_tag 'f[]', '' %>
|
||||||
<% include_calendar_headers_tags %>
|
<% include_calendar_headers_tags %>
|
||||||
|
|
|
@ -17,15 +17,17 @@
|
||||||
:revisions => @changesets,
|
:revisions => @changesets,
|
||||||
:entry => nil } %>
|
:entry => nil } %>
|
||||||
|
|
||||||
<div class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></div>
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @changeset_pages,@changeset_count %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<%= stylesheet_link_tag "scm" %>
|
<%= stylesheet_link_tag "scm" %>
|
||||||
<%= auto_discovery_link_tag(
|
<%= auto_discovery_link_tag(
|
||||||
:atom,
|
:atom,
|
||||||
params.merge(
|
params.merge(
|
||||||
{:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
{:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% other_formats_links do |f| %>
|
<% other_formats_links do |f| %>
|
||||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
|
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count %></div> -->
|
||||||
<div style="overflow: hidden">
|
<div style="overflow: hidden">
|
||||||
<div style="margin-left: 15%; float: left">
|
<div style="margin-left: 15%; float: left">
|
||||||
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_proportion)%></div>
|
<div style="padding-left: 45px; padding-bottom: 5px"><%=l(:label_work_scores_people)%></div>
|
||||||
<div>
|
<div>
|
||||||
<% 100.step(20, -20) do |star| %>
|
<% 100.step(20, -20) do |star| %>
|
||||||
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">
|
<div data-kls="Softapplication" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled" style="height: 20px; width: 115px; overflow: hidden; z-index: 1; position: relative;">
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
<div class="box tabular">
|
<div class="box tabular">
|
||||||
<p style="margin-left:-10px;">
|
<p style="margin-left:-10px;">
|
||||||
<%= f.text_field :name, :size => 60, :required => true %>
|
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-left:-20px;">
|
<p style="margin-left:-20px;">
|
||||||
<%= f.text_field :description, :size => 60, :style => "margin-left:10px;" %>
|
<%= f.text_field :description, :maxlength => 100, :style => "margin-left:10px;" %>
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-left:-20px;">
|
<p style="margin-left:-20px;">
|
||||||
<span style="margin-left:10px;">
|
<span style="margin-left:10px;">
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-left:-20px;">
|
<p style="margin-left:-20px;">
|
||||||
<span style="margin-left:10px;">
|
<span style="margin-left:10px;">
|
||||||
<%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %>
|
<%= f.text_field :wiki_page_title, :label => :label_wiki_page, :maxlength => 60, :disabled => @project.wiki.nil? %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-left:-20px;">
|
<p style="margin-left:-20px;">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<h3><%=l(:label_version_new)%></h3>
|
<h3>
|
||||||
|
<%=l(:label_version_new)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<%= labelled_form_for @version, :url => project_versions_path(@project) do |f| %>
|
<%= labelled_form_for @version, :url => project_versions_path(@project) do |f| %>
|
||||||
<%= render :partial => 'versions/form', :locals => { :f => f } %>
|
<%= render :partial => 'versions/form', :locals => { :f => f } %>
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -204,6 +204,8 @@ default:
|
||||||
# specific configuration options for production environment
|
# specific configuration options for production environment
|
||||||
# that overrides the default ones
|
# that overrides the default ones
|
||||||
production:
|
production:
|
||||||
|
# CJK support
|
||||||
|
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||||
|
|
||||||
# specific configuration options for development environment
|
# specific configuration options for development environment
|
||||||
# that overrides the default ones
|
# that overrides the default ones
|
||||||
|
|
|
@ -2006,7 +2006,7 @@ zh:
|
||||||
label_work_scores: 作品得分
|
label_work_scores: 作品得分
|
||||||
label_work_rating: 评分
|
label_work_rating: 评分
|
||||||
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
|
label_work_tishi: 您可以重新打分,打分结果以最后一次打分为主!
|
||||||
label_work_scores_proportion: 得分比例
|
label_work_scores_people: 得分人数
|
||||||
label_softapplication_type: 应用分类
|
label_softapplication_type: 应用分类
|
||||||
label_work_type: 作品分类
|
label_work_type: 作品分类
|
||||||
label_work_photo: 作品截图
|
label_work_photo: 作品截图
|
||||||
|
@ -2168,3 +2168,4 @@ zh:
|
||||||
label_contest_news_condition: 竞赛描述超过5000个汉字
|
label_contest_news_condition: 竞赛描述超过5000个汉字
|
||||||
label_no_contest_news_title: 竞赛标题不能为空
|
label_no_contest_news_title: 竞赛标题不能为空
|
||||||
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
label_contest_news_title_condition: 竞赛标题超过255个汉字
|
||||||
|
label_subject_empty: 主题不能为空
|
||||||
|
|
|
@ -24,10 +24,14 @@
|
||||||
<%= error_messages_for 'review' -%>
|
<%= error_messages_for 'review' -%>
|
||||||
<%= error_messages_for 'reply' -%>
|
<%= error_messages_for 'reply' -%>
|
||||||
<% if @notice -%>
|
<% if @notice -%>
|
||||||
<div class="flash notice"><%= @notice -%></div>
|
<div class="flash notice">
|
||||||
|
<%= @notice -%>
|
||||||
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @error -%>
|
<% if @error -%>
|
||||||
<div class="flash error"><%= @error -%></div>
|
<div class="flash error">
|
||||||
|
<%= @error -%>
|
||||||
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<!-- code review view -->
|
<!-- code review view -->
|
||||||
|
@ -77,9 +81,7 @@
|
||||||
|
|
||||||
<!-- review comment edit form -->
|
<!-- review comment edit form -->
|
||||||
<div class="box" id="update-form-<%= @review.id %>" style="display:none;">
|
<div class="box" id="update-form-<%= @review.id %>" style="display:none;">
|
||||||
<%
|
<% review_form_id = "review_form_#{@review.id}" -%>
|
||||||
review_form_id = "review_form_#{@review.id}"
|
|
||||||
-%>
|
|
||||||
<%= form_for :review,
|
<%= form_for :review,
|
||||||
:url => {:controller => 'code_review',
|
:url => {:controller => 'code_review',
|
||||||
:action => 'update',
|
:action => 'update',
|
||||||
|
@ -90,12 +92,20 @@
|
||||||
<%= hidden_field :issue, :lock_version%>
|
<%= hidden_field :issue, :lock_version%>
|
||||||
<%= hidden_field_tag :review_id, @review.id %>
|
<%= hidden_field_tag :review_id, @review.id %>
|
||||||
<p>
|
<p>
|
||||||
<label><b><%=h l(:field_subject)%>:</b></label>
|
<label>
|
||||||
|
<b>
|
||||||
|
<%=h l(:field_subject)%>:
|
||||||
|
</b>
|
||||||
|
</label>
|
||||||
<%= f.text_field :subject, :size => 70, :value => @review.subject%>
|
<%= f.text_field :subject, :size => 70, :value => @review.subject%>
|
||||||
</p>
|
</p>
|
||||||
<% if @allowed_statuses and @allowed_statuses.any? %>
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
||||||
<p>
|
<p>
|
||||||
<label><b><%=h l(:field_status)%>:</b></label>
|
<label>
|
||||||
|
<b>
|
||||||
|
<%=h l(:field_status)%>:
|
||||||
|
</b>
|
||||||
|
</label>
|
||||||
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -108,10 +118,8 @@
|
||||||
:id => 'review_comment_' + @review.id.to_s %>
|
:id => 'review_comment_' + @review.id.to_s %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%
|
<% submit_url = url_for(:controller => 'code_review', :action => 'update', :id => @project) -%>
|
||||||
submit_url = url_for(:controller => 'code_review', :action => 'update', :id => @project)
|
<%= button_to_function l(:button_submit), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{review_form_id}').serialize())" %>
|
||||||
-%>
|
|
||||||
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{review_form_id}').serialize())" %>
|
|
||||||
<input type="button" value="<%=h l(:button_cancel) %>" onclick='$("#review_form_<%= @review.id %>").hide();' />
|
<input type="button" value="<%=h l(:button_cancel) %>" onclick='$("#review_form_<%= @review.id %>").hide();' />
|
||||||
<%= link_to_function l(:label_preview), "$('#preview_#{@review.id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{review_form_id}').serialize())" %>
|
<%= link_to_function l(:label_preview), "$('#preview_#{@review.id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{review_form_id}').serialize())" %>
|
||||||
</p>
|
</p>
|
||||||
|
@ -127,14 +135,18 @@
|
||||||
<% # ChiliProject -%>
|
<% # ChiliProject -%>
|
||||||
<% if journals.length > 0 %>
|
<% if journals.length > 0 %>
|
||||||
<div id="history">
|
<div id="history">
|
||||||
<h3 class="rounded-background"><%= l(:label_history) %></h3>
|
<h3 class="rounded-background">
|
||||||
|
<%= l(:label_history) %>
|
||||||
|
</h3>
|
||||||
<%= render :partial => 'history', :locals => { :issue => @review.issue, :journals => journals } %>
|
<%= render :partial => 'history', :locals => { :issue => @review.issue, :journals => journals } %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% # Redmine -%>
|
<% # Redmine -%>
|
||||||
<% if journals.length > 0 %>
|
<% if journals.length > 0 %>
|
||||||
<h3><%= l(:label_history) %></h3>
|
<h3>
|
||||||
|
<%= l(:label_history) %>
|
||||||
|
</h3>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render :partial => 'reply', :collection => journals %>
|
<%= render :partial => 'reply', :collection => journals %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -144,9 +156,7 @@
|
||||||
<p>
|
<p>
|
||||||
<%= toggle_link l(:button_reply), "reply_#{@review.id}", :focus => 'reply_comment_' + @review.id.to_s %>
|
<%= toggle_link l(:button_reply), "reply_#{@review.id}", :focus => 'reply_comment_' + @review.id.to_s %>
|
||||||
</p>
|
</p>
|
||||||
<%
|
<% message_form_id = "message-form-#{@review.id}" -%>
|
||||||
message_form_id = "message-form-#{@review.id}"
|
|
||||||
-%>
|
|
||||||
<div id="reply_<%= @review.id %>" style="display:none;" class="box">
|
<div id="reply_<%= @review.id %>" style="display:none;" class="box">
|
||||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @project, :review_id => @review.id}, :html => {:id => message_form_id} do |f| %>
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @project, :review_id => @review.id}, :html => {:id => message_form_id} do |f| %>
|
||||||
<%= hidden_field_tag :review_id, @review.id %>
|
<%= hidden_field_tag :review_id, @review.id %>
|
||||||
|
@ -154,8 +164,9 @@
|
||||||
<%= hidden_field :issue, :lock_version%>
|
<%= hidden_field :issue, :lock_version%>
|
||||||
<% if @allowed_statuses and @allowed_statuses.any? %>
|
<% if @allowed_statuses and @allowed_statuses.any? %>
|
||||||
<p>
|
<p>
|
||||||
<label><%=h l(:field_status) %>:</label>
|
<label>
|
||||||
<% # select :review, :status, {l(:label_review_closed) => CodeReview::STATUS_CLOSED, l(:label_review_open) => CodeReview::STATUS_OPEN} %>
|
<%=h l(:field_status) %>:
|
||||||
|
</label>
|
||||||
<%= select :review, :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
<%= select :review, :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -168,13 +179,9 @@
|
||||||
:id => 'reply_comment_' + @review.id.to_s %>
|
:id => 'reply_comment_' + @review.id.to_s %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%
|
<% submit_url = url_for(:controller => 'code_review', :action => 'reply', :id => @project)-%>
|
||||||
submit_url = url_for(:controller => 'code_review', :action => 'reply', :id => @project)
|
|
||||||
-%>
|
|
||||||
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{message_form_id}').serialize())" %>
|
<%= button_to_function l(:button_apply), "$('#show_review_#{@review.id}').load('#{submit_url}', $('##{message_form_id}').serialize())" %>
|
||||||
<%
|
<% reply_preview_id = "reply_preview_#{@review.id}" -%>
|
||||||
reply_preview_id = "reply_preview_#{@review.id}"
|
|
||||||
-%>
|
|
||||||
<%= link_to_function l(:label_preview), "$('##{reply_preview_id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{message_form_id}').serialize())" %>
|
<%= link_to_function l(:label_preview), "$('##{reply_preview_id}').load('#{url_for(:controller => 'code_review', :action => 'preview', :id => @project)}', $('##{message_form_id}').serialize())" %>
|
||||||
</p>
|
</p>
|
||||||
<div id="<%= reply_preview_id %>" class="wiki"></div>
|
<div id="<%= reply_preview_id %>" class="wiki"></div>
|
||||||
|
@ -182,7 +189,5 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ tr.message.locked td.subject { background: url(../images/locked.png) no-repeat 0
|
||||||
tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; }
|
tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; }
|
||||||
|
|
||||||
tr.version.closed, tr.version.closed a { color: #999; }
|
tr.version.closed, tr.version.closed a { color: #999; }
|
||||||
tr.version td.name { padding-left: 20px;word-break: break-all; }
|
tr.version td.name { padding-left: 20px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; }
|
||||||
tr.version td.description{word-break: break-all}
|
tr.version td.description{word-break: break-all}
|
||||||
tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
|
tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
|
||||||
tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }
|
tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }
|
||||||
|
|
Loading…
Reference in New Issue