Merge branch 'develop' of http://repository.trustie.net/xianbo/trustie2 into develop
commit
663634b9da
@ -0,0 +1,2 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
@ -0,0 +1,2 @@
|
||||
// Place all the behaviors and hooks related to the matching controller here.
|
||||
// All this logic will automatically be available in application.js.
|
@ -0,0 +1,4 @@
|
||||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
@ -0,0 +1,4 @@
|
||||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
@ -0,0 +1,5 @@
|
||||
class CourseInfos < ActiveRecord::Base
|
||||
attr_accessible :user_id, :course_id
|
||||
belongs_to :user
|
||||
belongs_to :course
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class CourseStatus < ActiveRecord::Base
|
||||
attr_accessible :changesets_count, :course_ac_para, :course_id, :grade, :watchers_count
|
||||
end
|
@ -1,8 +1,8 @@
|
||||
class HomeworkForCourse < ActiveRecord::Base
|
||||
attr_accessible :bid_id, :project_id
|
||||
attr_accessible :bid_id, :course_id
|
||||
|
||||
belongs_to :bid
|
||||
belongs_to :project
|
||||
belongs_to :course
|
||||
|
||||
|
||||
end
|
||||
|
@ -0,0 +1,4 @@
|
||||
class UserScoreDetails < ActiveRecord::Base
|
||||
attr_accessible :current_user_id, :current_user_level, :new_score, :old_score, :score_action, :score_changeable_obj_id, :score_changeable_obj_type, :score_type, :target_user_id, :target_user_level, :user_id
|
||||
belongs_to :score_changeable_obj,:polymorphic => true
|
||||
end
|
@ -0,0 +1,14 @@
|
||||
<% edit_allowed = User.current.allowed_to?(:manage_files, @course) %>
|
||||
<% if attachmenttypes.any? %>
|
||||
<div id="put-tag-form-<%=attachment.id%>" class="hidden">
|
||||
<%= select_tag "attachment_type",
|
||||
options_from_collection_for_select(attachmenttypes, "id",
|
||||
"typeName",attachment.attachtype), :onchange=>"course_attachmenttypes_change("+attachment.id.to_s + ",this.value)"%>
|
||||
</div>
|
||||
<%= link_to(image_tag('edit/edit.png'), 'javascript:void(0);',:style=>"white-space:nowrap;", :id=>"edit_box"+attachment.id.to_s ,
|
||||
:onclick =>"$('#put-tag-form-" +attachment.id.to_s+ "').show();
|
||||
$('#attach_type_id_label" +attachment.id.to_s+ "').hide();
|
||||
$('#edit_box" +attachment.id.to_s+ "').hide();") if edit_allowed %>
|
||||
|
||||
<% end %>
|
||||
|
@ -0,0 +1,3 @@
|
||||
<div class="tags_area">
|
||||
<%= render :partial => 'tags/tagEx', :locals => {:obj => file, :object_flag => "6"} %>
|
||||
</div>
|
@ -0,0 +1,24 @@
|
||||
<table style="width: 200px;table-layout: fixed" >
|
||||
<tr>
|
||||
<% count = 0 %>
|
||||
<% for attachment in attachments %>
|
||||
<% if attachments.count == 1 %>
|
||||
<td title="<%= attachment.filename%>" style="width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
|
||||
</td>
|
||||
<% elsif attachments.count == 2 %>
|
||||
<td title="<%= attachment.filename%>" style="width: 100px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td title="<%= attachment.filename%>" style="width: 66px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<% if count == 3 %>
|
||||
<% break %>
|
||||
<% end %>
|
||||
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
|
||||
<% count = count +1 %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
</table>
|
@ -0,0 +1,6 @@
|
||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments', :action => 'show',
|
||||
:id => attachment, :filename => attachment.filename,:style => "width:50px"%>
|
||||
<% end %>
|
@ -0,0 +1,72 @@
|
||||
<% if @bid.homework_type == Bid::HomeworkFile %>
|
||||
<!-- 提交文件类型 -->
|
||||
<%= render :partial => 'homework' %>
|
||||
|
||||
<% else %>
|
||||
<!-- 提交引用项目 -->
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-bid-form").hide();
|
||||
}
|
||||
</script>
|
||||
<% if User.current.logged? %>
|
||||
<!--我要竞标弹出框-->
|
||||
<div id='flash' style="float:left; width: 100%; display: none"></div>
|
||||
<div id="put-bid-form" style="display: none">
|
||||
<%= form_for "bid_for_save", :remote => true, :url => {:controller => 'bids', :action => 'add'},
|
||||
:update => "bidding_project_list",
|
||||
:complete => '$("#put-bid-form").hide();' do |f| %>
|
||||
<table id="bidding_table" border="0" width="100%" style="margin-left: 40px;">
|
||||
<tr>
|
||||
<td><%= select_tag 'bid', options_for_select(select_option_helper(@option)), :name => 'bid', :class => 'grayline' %></td>
|
||||
<div id="prompt_create_pro">
|
||||
<td>
|
||||
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</tr>
|
||||
<% if @bid.reward_type == Bid::Homework %>
|
||||
<tr>
|
||||
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason_homework), :style => "resize: none;", :class => 'noline' %></td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline' %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<%= submit_tag l(:button_add), :name => nil, :class => "enterprise",
|
||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id='bidding_project_list'>
|
||||
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project, :bid => @bid} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -0,0 +1,106 @@
|
||||
<!-- <%= course_board_breadcrumb(@board) %> -->
|
||||
|
||||
<!--new and follow-->
|
||||
<!-- <div class="content-title-top">
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
|
||||
<!-- <%= watcher_link(@board, User.current) %> -->
|
||||
<!-- </div> -->
|
||||
<div id="add-message" class="add_frame" style="display:none;">
|
||||
<% if User.current.logged? %>
|
||||
<h3><%= link_to h(@board.name), course_board_path(@course, @board) %> » <%= l(:label_message_new) %></h3>
|
||||
<div class="add_frame_header" >
|
||||
<%= l(:label_message_new) %>
|
||||
</div>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<div class="borad-title"><%=h @board.name %></div>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_course_board) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- <div class="borad-description"><%=h @board.description %></div> -->
|
||||
<div class="borad-setitle">
|
||||
<span class="borad-topic-count">共有 <%=link_to @topics.count %> 个贴子</span>
|
||||
<span>
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% 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| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %></td>
|
||||
<td>
|
||||
<table width="640px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></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><td colspan="2" ><span class="font_description">标签</span></td></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>
|
||||
|
||||
<!-- <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>
|
||||
</tr> -->
|
||||
<% end %>
|
||||
<!-- </tbody>
|
||||
</table> -->
|
||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% html_title @board.name %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@course}: #{@board}") %>
|
||||
<% end %>
|
@ -0,0 +1,110 @@
|
||||
<!-- <%= board_breadcrumb(@board) %> -->
|
||||
|
||||
<!--new and follow-->
|
||||
<!-- <div class="content-title-top">
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
|
||||
<!-- <%= watcher_link(@board, User.current) %> -->
|
||||
<!-- </div> -->
|
||||
<div id="add-message" class="add_frame" style="display:none;">
|
||||
<% if User.current.logged? %>
|
||||
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h3>
|
||||
<div class="add_frame_header" >
|
||||
<%= l(:label_message_new) %>
|
||||
</div>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<div class="borad-title"><%=h @board.name %></div>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<% if @project.project_type == 1 %>
|
||||
<%= l(:label_user_login_course_board) %>
|
||||
<% else %>
|
||||
<%= l(:label_user_login_project_board) %>
|
||||
<% end %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- <div class="borad-description"><%=h @board.description %></div> -->
|
||||
<div class="borad-setitle">
|
||||
<span class="borad-topic-count">共有 <%=link_to @topics.count %> 个贴子</span>
|
||||
<span>
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% 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| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %></td>
|
||||
<td>
|
||||
<table width="640px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></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><td colspan="2" ><span class="font_description">标签</span></td></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>
|
||||
|
||||
<!-- <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>
|
||||
</tr> -->
|
||||
<% end %>
|
||||
<!-- </tbody>
|
||||
</table> -->
|
||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% html_title @board.name %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
||||
<% end %>
|
@ -1,110 +1,5 @@
|
||||
<!-- <%= board_breadcrumb(@board) %> -->
|
||||
|
||||
<!--new and follow-->
|
||||
<!-- <div class="content-title-top">
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> -->
|
||||
<!-- <%= watcher_link(@board, User.current) %> -->
|
||||
<!-- </div> -->
|
||||
<div id="add-message" class="add_frame" style="display:none;">
|
||||
<% if User.current.logged? %>
|
||||
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h3>
|
||||
<div class="add_frame_header" >
|
||||
<%= l(:label_message_new) %>
|
||||
</div>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<div class="borad-title"><%=h @board.name %></div>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<% if @project.project_type == 1 %>
|
||||
<%= l(:label_user_login_course_board) %>
|
||||
<% else %>
|
||||
<%= l(:label_user_login_project_board) %>
|
||||
<% end %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- <div class="borad-description"><%=h @board.description %></div> -->
|
||||
<div class="borad-setitle">
|
||||
<span class="borad-topic-count">共有 <%=link_to @topics.count %> 个贴子</span>
|
||||
<span>
|
||||
<%= link_to l(:label_message_new),
|
||||
new_board_message_path(@board),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="padding-top: 10px">
|
||||
<% 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| %>
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %></td>
|
||||
<td>
|
||||
<table width="640px" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></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><td colspan="2" ><span class="font_description">标签</span></td></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>
|
||||
|
||||
<!-- <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>
|
||||
</tr> -->
|
||||
<% end %>
|
||||
<!-- </tbody>
|
||||
</table> -->
|
||||
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% html_title @board.name %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
||||
<% if @project %>
|
||||
<%= render :partial => 'project_show', locals: {project: @project} %>
|
||||
<% elsif @course %>
|
||||
<%= render :partial => 'course_show', locals: {course: @course} %>
|
||||
<% end %>
|
||||
|
@ -0,0 +1,87 @@
|
||||
<div class="project-block">
|
||||
<div class="img-tag-2">
|
||||
<% if get_avatar?(course)%>
|
||||
<%= image_tag(url_to_avatar(course), :class => "avatar2") %>
|
||||
<% else %>
|
||||
<%= image_tag('../images/avatars/course/course.jpg', :class => "avatar2") %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="wiki-description">
|
||||
<p >
|
||||
<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%>
|
||||
<%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%>
|
||||
</p>
|
||||
<p >
|
||||
<%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%>
|
||||
<% @admin = @course.course_infos%>
|
||||
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
|
||||
<!-- <%= @admin.first.user.user_extensions.occupation %> -->
|
||||
<%# unless @course.course_extra.school.nil? %>
|
||||
<%= @course.teacher.user_extensions.school.try(:name) %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p >
|
||||
<%= content_tag('div', "#{l(:field_teacher_name)}:", :class => "info course-font teacher") %>
|
||||
<% if @admin.size > 0 %>
|
||||
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="information_for_course" >
|
||||
<p class="stats">
|
||||
<%= content_tag('span', link_to("#{@course.homeworks.count}", homework_course_path(@course)), :class => "info") %>
|
||||
<%= content_tag('span', l(:label_x_task, :count => @course.homeworks.count)) %>
|
||||
</p>
|
||||
<p class="stats">
|
||||
<% files_count = @course.attachments.count %>
|
||||
<%= content_tag('span', link_to(files_count, course_files_path(@course)), :class => "info") %>
|
||||
<%= content_tag('span', l(:label_x_data,:count => files_count)) %>
|
||||
</p>
|
||||
<p class="stats">
|
||||
<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %>
|
||||
<%= content_tag('span', l(:label_x_member, :count => @course.members.count)) %>
|
||||
</p>
|
||||
|
||||
<!--gcm-->
|
||||
<p class="stats">
|
||||
|
||||
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %>
|
||||
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
|
||||
</p>
|
||||
<!--gcm-->
|
||||
|
||||
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
|
||||
<span class="info"></span>
|
||||
<% if(course_endTime_timeout? @course) %>
|
||||
<span class="font_lighter">
|
||||
课程学期已结束
|
||||
</span>
|
||||
<% else %>
|
||||
<%= join_in_course_for_list(@course, User.current,['regular'])%>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="add-info">
|
||||
<div class="main-language" style="margin-left: 30px;margin-top:-10px">
|
||||
<%= content_tag "span","#{l(:label_duration_time)}:", :class => "course-font"%>
|
||||
<%= get_course_term @course %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="add-info" style="margin-left: 30px; margin-top: -20px">
|
||||
<%= content_tag "span", "#{l(:label_course_brief_introduction)}:", :class => "course-font" %>
|
||||
<%= content_tag "div", course.short_description, :class => "brief_introduction", :title => course.short_description %>
|
||||
</div>
|
||||
|
||||
<div class="tags">
|
||||
<div id="tags">
|
||||
<%= image_tag( "/images/sidebar/tags.png") %>
|
||||
<%= render :partial => 'tags/tag_name', :locals => {:obj => @course,:object_flag => "9",:non_list_all => true }%>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,6 @@
|
||||
<div class="box tabular" style="margin-right:10px;" >
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
</div>
|
@ -0,0 +1,35 @@
|
||||
<% if members.any? %>
|
||||
<% members.each do |member| %>
|
||||
<div class="well">
|
||||
<% next if member.new_record? %>
|
||||
<% unless member.created_on.nil? %>
|
||||
<%= content_tag "p", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
|
||||
<% end %>
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
|
||||
<% if @canShowCode %>
|
||||
<%= content_tag "div", link_to(member.user.show_name, user_path(member.user)), :class => "nomargin avatar_name" %>
|
||||
<% else %>
|
||||
<%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>
|
||||
<% end %>
|
||||
<!--teacher's code disapeared moified by huang-->
|
||||
|
||||
<% unless member.user.user_extensions.identity ==0 %>
|
||||
<!-- added by bai 加学号 -->
|
||||
<%if @canShowCode%>
|
||||
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class ="clear avatar_name">
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
|
||||
</div>
|
||||
<% end; reset_cycle %>
|
||||
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% end %>
|
@ -0,0 +1,102 @@
|
||||
<script>
|
||||
var W3CDOM = document.createElement && document.getElementsByTagName;
|
||||
|
||||
window.onload = setMaxLength;
|
||||
|
||||
function setMaxLength() {
|
||||
if (!W3CDOM) return;
|
||||
var textareas = document.getElementsByTagName('textarea');
|
||||
for (var i=0;i<textareas.length;i++) {
|
||||
var textarea = textareas[i];
|
||||
setMaxLengthItem(textareas[i]);
|
||||
}
|
||||
}
|
||||
function setMaxLengthItem(textarea){
|
||||
if (textarea.getAttribute('maxlength')) {
|
||||
var counter = document.createElement('div');
|
||||
counter.className = 'counter';
|
||||
var counterClone = counter.cloneNode(true);
|
||||
counterClone.innerHTML = '<span>0</span>/'+textarea.getAttribute('maxlength');
|
||||
textarea.parentNode.insertBefore(counterClone,textarea.nextSibling);
|
||||
textarea.relatedElement = counterClone.getElementsByTagName('span')[0];
|
||||
textarea.onkeyup = textarea.onchange = checkMaxLength;
|
||||
textarea.onkeyup();
|
||||
}
|
||||
}
|
||||
|
||||
function checkMaxLength() {
|
||||
var maxLength = this.getAttribute('maxlength');
|
||||
var currentLength = this.value.length;
|
||||
if (currentLength > maxLength)
|
||||
this.relatedElement.className = 'toomuch';
|
||||
else
|
||||
this.relatedElement.className = '';
|
||||
this.relatedElement.firstChild.nodeValue = currentLength;
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- fq -->
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%>
|
||||
<%= f.text_area 'course_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<% if @jour.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in @jour%>
|
||||
<li id='word_li_<%=journal.id.to_s%>' class="outer-message-for-user">
|
||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||
<span class="body">
|
||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||
<%= textilizable journal.notes%>
|
||||
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
||||
<% id = 'course_respond_form_'+journal.id.to_s%>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'#',
|
||||
{:focus => 'course_respond',
|
||||
:onclick => "toggleAndSettingWordsVal($('##{id}'),
|
||||
$('##{id} textarea'),
|
||||
'#{l(:label_reply_plural)} #{journal.user.name}: ');
|
||||
return false;"} %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= id %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<h3>文件列表</h3>
|
@ -0,0 +1,12 @@
|
||||
<% if @save_flag %>
|
||||
<% if Rails.env.development? %>
|
||||
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@course.extra).try(:endup_time)%>');
|
||||
<% end %>
|
||||
$('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user,
|
||||
:memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>")
|
||||
//$('#finish_course_ <%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>")
|
||||
<% else %>
|
||||
alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。');
|
||||
<% end %>
|
||||
|
||||
|
@ -0,0 +1,67 @@
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
||||
<div class="top-content">
|
||||
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current.user_extensions.identity == 0 %>
|
||||
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new'},
|
||||
:class => 'icon icon-add') if User.current.allowed_to?(:add_course,nil, :global => true) %></td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="2" >
|
||||
<div class="course-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/course", :controller => 'courses', :action => 'index', :course_type => 1 %> </a></td>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index', :course_type => 1 %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= sort_course(@s_type, @school_id)%>
|
||||
|
||||
<div id="courses-index">
|
||||
<%if @courses%>
|
||||
<%= render_course_hierarchy(@courses)%>
|
||||
<%end%>
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= pagination_links_full @course_pages, @course_count %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<p style="text-align:right;">
|
||||
<span class="my-course"><%= l(:label_my_course) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<h3><%= l(:label_project_plural) %></h3>
|
||||
<label for="closed"><%= check_box_tag 'closed', 1, params[:closed] %> <%= l(:label_show_closed_projects) %></label>
|
||||
<p>
|
||||
<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_new_course)) -%>
|
@ -0,0 +1,10 @@
|
||||
<div class="member_header">
|
||||
<p>
|
||||
<%= @subPage_title %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="member_content">
|
||||
<%= error_messages_for 'member' %>
|
||||
<%= render :partial => @render_file, :locals => {:members => @members} %>
|
||||
</div>
|
||||
|
@ -0,0 +1,9 @@
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<h3><%=l(:label_course_new)%></h3>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
|
||||
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
|
||||
<%= javascript_tag "$('#course_name').focus();" %>
|
||||
</div>
|
||||
<% end %>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue