This commit is contained in:
alan 2014-12-18 18:25:02 +08:00
commit c560ca617b
19 changed files with 247 additions and 215 deletions

View File

@ -348,7 +348,7 @@ class HomeworkAttachController < ApplicationController
else
end
else
render_403 :message => :notice_not_authorized
render_403
end
end

View File

@ -48,7 +48,7 @@ class SoftapplicationsController < ApplicationController
def show
@softapplication = Softapplication.find(params[:id])
@project = @softapplication.project
#@project = @softapplication.project
# 打分统计
stars_reates = @softapplication.
rates(:quality)

View File

@ -36,7 +36,7 @@ class Course < ActiveRecord::Base
acts_as_attachable :view_permission => :view_course_files,
:delete_permission => :manage_files
validates_presence_of :password, :term,:name,:description
validates_presence_of :password, :term,:name
validates_format_of :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
validates_length_of :description, :maximum => 10000

View File

@ -50,7 +50,7 @@
<h2>开启匿评功能</h2>
<p>
开启匿评后学生将不能对作业进行
<span class="c_blue">提交、修改、删除</span>
<span class="c_blue">修改、删除</span>
等操作,目前有
<span class="c_pink"><%= totle_size%>个</span>
学生,共提交了

View File

@ -124,14 +124,6 @@
</strong>)
<% end %>
</span>
<span class="font_lighter">
<%= l(:label_students_responses) %>
(
<strong>
<%= bid.commit.nil? ? 0 : bid.commit %>
</strong>
)
</span>
</td>
</tr>
<tr>

View File

@ -1,10 +1,7 @@
<script type="text/javascript">
function submitCoursesBoard()
{
if(regexSubject()&&regexContent())
{
$("#message-form").submit();
}
if(regexSubject()&&regexContent()){$("#message-form").submit();}
}
</script>
<div id="add-message" class="add_frame" style="display:none;">

View File

@ -1,5 +1,5 @@
<div class="top-content">
<%= form_tag({:controller => 'contests', :action => 'index'}, :method => :get) do %>
<%= form_tag({:controller => 'contests', :action => 'index'}, :method => :get, :id => 'contests_serch') do %>
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf" rowspan="2">
@ -20,19 +20,41 @@
</td>
<td rowspan="2" >
<div class="project-search" style="float: right">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<script type="text/javascript">
function regexName()
{
var name = $.trim($("#name").val());
if(name.length == 0)
{
$("#contest_name_span").text("<%= l(:label_search_conditions_not_null) %>");
$("#contest_name_span").css('color','#ff0000');
$("#contest_name_span").focus();
return false;
}
else
{
$("#contest_name_span").text("");
return true;
}
}
function submitSerch()
{
if(regexName()){$("#contests_serch").submit();}
}
</script>
<%= text_field_tag 'name', params[:name], :size => 30, :onblur => 'regexName();' %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10">
<%= l(:label_search)%>
</a>
<br />
<span id="contest_name_span"></span>
</div>
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<a>
<%= link_to request.host()+"/contests", contests_path %>
<!-- end longjun -->
</a>
</td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<a><%= l(:label_contest_innovate) %></a>
@ -43,14 +65,14 @@
<% end %>
</div>
<% if @contests.size > 0%>
<%= sort_contest(@s_state)%>
<%#= sort_contest(@s_state)%>
<div id="bid-show" class="projects-index">
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
</div>
<% elsif @is_search%>
<%= render :partial => "layouts/no_content"%>
<% else %>
<%= sort_contest(@s_state)%>
<%#= sort_contest(@s_state)%>
<div id="bid-show" class="projects-index">
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
</div>

View File

@ -2,22 +2,21 @@
<% attachmenttypes = @project.attachmenttypes %>
<% sufixtypes = @project.contenttypes %>
<span class="borad-title"><%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区</span>
<span class="borad-title">
<%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>
资源共享区
</span>
<div class="content-title-top">
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
<div class="clearfix"></div>
<div id="file_buttons" class="nhidden">
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @project) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %>
<p></p>
<div id="upload_file_div" class="relation_file_div hidden">
<%= render :partial => 'new', locals: {project: @project} %>
</div>
<div id="relation_file_div" class="relation_file_div hidden">
<fieldset>
<legend>搜索</legend>
@ -48,16 +47,23 @@
</div>
<div class="box" id="files-box">
<label for="files-box" style="font-weight:bold;">&nbsp;&nbsp;<%= l(:label_files_filter) %></label>
<label for="files-box" style="font-weight:bold;">
&nbsp;&nbsp;
<%= l(:label_files_filter) %>
</label>
<% if attachmenttypes.any? %>
&nbsp; &nbsp; &nbsp;
<label for="attachment_browse_label"><%= l(:attachment_browse) %></label>
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName",params[:type]),
<label for="attachment_browse_label">
<%= l(:attachment_browse) %>
</label>
<%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName",params[:type]),
:onchange => "attachmenttypes_searchex(this.value)" %>
<% end %>
<% if sufixtypes.any? %>
&nbsp;
<label for="attach_sufix_browse_label"><%= l(:attachment_sufix_browse) %></label>
<label for="attach_sufix_browse_label">
<%= l(:attachment_sufix_browse) %>
</label>
<%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes),
:onchange => "attachment_contenttypes_searchex(this.value)" %>
<% end %>
@ -65,20 +71,14 @@
</div>
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:project_id => @project.id, :format => 'js') }')" %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<div id="all_browse_div" class="all_browse_div">
<%#= render :partial => 'show_all_attachment' %>
<% if (@attachtype==0 && @contenttype=='0') || (@attachtype.nil? && @contenttype.nil?) %>
<%= render partial: "show_all_attachment"%>
<%= render partial: "show_all_attachment"%>
<%else%>
<%= render partial: "sort_by_attachtypel"%>
<%= render partial: "sort_by_attachtypel"%>
<%end%>
</div>

View File

@ -1,67 +1,69 @@
<div class="autoscroll">
<ul>
<% issue_list(issues) do |issue, level| -%>
<% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
<ul>
<% issue_list(issues) do |issue, level| -%>
<% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
<% reset_cycle %>
<% previous_group = group %>
<% end %>
<div style="">
<li id="issue-<%= issue.id %>" class="hascontextmenu-1 <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
<% end %>
<div style="">
<li id="issue-<%= issue.id %>" class="hascontextmenu-1 <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
<% if issue.tracker_id == 1 %>
<%= image_tag("/images/task.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 2 %>
<%= image_tag("/images/feature.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 3 %>
<%= image_tag("/images/support.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 4 %>
<%= image_tag("/images/issues.png", :class => "img-tag-issues") %>
<% end %>
<!-- 在这里添加赞和踩-->
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals =>
{:obj => issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%>
</span>
<ul class="issue_list">
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<ul class="list-group-item-meta" style="word-break: break-all;word-wrap: break-word;width: 100%;">
<!-- 在这里添加赞和踩-->
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",:locals =>
{:obj => issue,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%>
</span>
<span>
<%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %>
</span>
<%= l(:label_post_on)%>
<% a = [] %>
<% a << column_content[1] %>
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
<% if issue.tracker_id == 1 %>
<%= image_tag("/images/task.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 2 %>
<%= image_tag("/images/feature.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 3 %>
<%= image_tag("/images/support.png", :class => "img-tag-issues") %>
<% end %>
<% if issue.tracker_id == 4 %>
<%= image_tag("/images/issues.png", :class => "img-tag-issues") %>
<% end %>
<ul class="issue_list">
<% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<ul class="list-group-item-meta" style="word-break: break-all;word-wrap: break-word;">
<span> <%= link_to issue.author.name, user_path(issue.author), :class => "bid_user_u" %></span>
<%= l(:label_post_on)%> <% a = [] %>
<% a << column_content[1] %>
<%# a << "##{column_content[0]}" << "(#{raw column_content[2]}):" << column_content[4] %>
<% a << "#{issue.source_from}" << "(#{raw column_content[2]}):" << column_content[4] %>
<%= link_to a.join(' '), issue_path(issue.id), :class => "issue-link" , :target =>"_blank"%>
</ul>
<% end -%>
<ul class="list-group-item-meta">
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<%= textilizable issue, :description %>
</div>
</ul>
<ul class="list-group-item-meta">
<% unless issue.assigned_to_id.nil? %>
<span>
<%= l(:field_assigned_to)%>&nbsp;
</span>
<ul class="list-group-item-meta">
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<%= textilizable issue, :description %>
</div>
</ul>
</ul>
<ul class="list-group-item-meta" style="margin-top: -15px;">
<% unless issue.assigned_to_id.nil? %>
<span>
<%= l(:field_assigned_to)%>&nbsp;
</span>
<%= raw column_content[5] %>&nbsp;
<% end %>
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
<div class="find-comment-class">
<% end %>
<%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>
<div class="find-comment-class">
<span>
<%= link_to l(:label_find_all_comments), issue_path(issue.id) %>
</span>
<%= l(:label_comments_count, :count => issue.journals.all.count) %>
</div>
</ul>
</ul>
</li>
</div>
<% end -%>
</ul>
<%= l(:label_comments_count, :count => issue.journals.all.count) %>
</div>
</ul>
<% end -%>
</ul>
</li>
</div>
<% end -%>
</ul>
</div>

View File

@ -17,7 +17,8 @@
<%=link_to l(:field_homepage), home_path %> >
<a><%= l(:label_contest_innovate) %></a>
<span>
<% contest = @softapplication.contests.first %><%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
<% contest = @softapplication.contests.first %>
<%= contest ? link_to(">" + contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
</span>
</td>

View File

@ -15,7 +15,7 @@
} do |f| %>
<%= render :partial => 'form',
:locals => {:f => f, :replying => !@message.parent.nil?} %>
<a href="#" onclick="$('#message-form').submit();" class="ButtonColor m3p10">
<a href="#" onclick="if(regexSubject()&&regexContent()){$('#message-form').submit();}" class="ButtonColor m3p10">
<%= l(:button_save) %>
</a>
<%= link_to l(:button_cancel), board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)), :class => "ButtonColor m3p10" %>

View File

@ -1,7 +1,15 @@
<% if @project %>
<h3><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h3>
<h3>
<%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %>
&#187;
<%= l(:label_message_new) %>
</h3>
<% elsif @course %>
<h3><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :course_id => @course, :id => @board %> &#187; <%= l(:label_message_new) %></h3>
<h3>
<%= link_to h(@board.name), :controller => 'boards', :action => 'show', :course_id => @course, :id => @board %>
&#187;
<%= l(:label_message_new) %>
</h3>
<% end %>
<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>

View File

@ -1,4 +1,5 @@
<%= render :partial => 'layouts/base_softapplication_top_content' %>
<% html_title(@softapplication.name) -%>
<div style="height: auto; padding-bottom: 10px" class="softapplications-div">
<tr>
<td colspan="2" valign="top" width="320">
@ -47,8 +48,9 @@
</tr>
<tr>
<td style="padding-left: 40px">
<% if @project %>
<%=l(:label_attendingcontestwork_deposit_project)%><%= link_to "#@project", project_path(@project) %>
<% if @softapplication.project %>
<%=l(:label_attendingcontestwork_deposit_project)%>
<%= link_to "#{@softapplication.project}", project_path(@softapplication.project) %>
<% end %>
</td>
</tr>

View File

@ -1,6 +1,6 @@
<div id="tags">
<%#begin
1 代表是user类型
1 代表是user类型
2 代表是project类型
3 代表是issue类型
4 代表是bid类型
@ -44,14 +44,14 @@
<span>
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
:class => "tags_icona",
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').slideToggle(); readmore(this);" if User.current.logged? %>
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
<%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>
</span>
&nbsp;&nbsp;
<div id="tags_show-<%=obj.class%>-<%=obj.id%>" style="display:inline; ">
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
</div>
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;height: 100px;">
<div id="put-tag-form-<%=obj.class%>-<%=obj.id%>" style="display: none;">
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
</div>
<% else %>

View File

@ -9,108 +9,103 @@
</script>
<!-- 1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求 7代表竞赛 9代表课程-->
<% @tags = obj.reload.tag_list %>
<% if non_list_all and (@tags.size > 0) %>
<!-- 这里是显示的非主页的tag 所以当tag数量较多时 不必全部显示 用“更多”代替 -->
<% if @tags.size > Setting.show_tags_length.to_i then %>
<% i = 0 %>
<% until i>Setting.show_tags_length.to_i do %>
<div id="tag">
<%= link_to @tags[i], :controller => "tags", :action => "index", :q => @tags[i], :object_flag => object_flag, :obj_id => obj.id %>
</div>
<% i += 1 %>
<% end %>
<%= more_tags(obj.id,object_flag)%>
<% else %>
<% @tags.each do |tag| %>
<div id="tag">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
</div>
<% end %>
<% end %>
<% else %>
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
<div id="tag">
<span class="tag_show"> <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>
<% when '1' %>
<% if User.current.eql?(obj) %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '2' %>
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '3' %>
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '4' %>
<% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '5' %>
<% test = Forum.find(obj.id) %>
<% if test && test.creator_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '6' %>
<%# if (User.current.logged? &&
User.current.admin?
# && (@project && User.current.member_of?(@project))
)
%>
<% if obj.author_id == User.current.id || User.current.admin?%>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '7' %>
<% if obj.author_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% when '9' %>
<% if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %>
<% end %>
</span>
<span class="tag_show">
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
<% case object_flag %>
<% when '1' %>
<% if User.current.eql?(obj) %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '2' %>
<% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '3' %>
<% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '4' %>
<% if obj.author_id == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '5' %>
<% test = Forum.find(obj.id) %>
<% if test && test.creator_id == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '6' %>
<%# if (User.current.logged? &&
User.current.admin?
# && (@project && User.current.member_of?(@project))
)
%>
<% if obj.author_id == User.current.id || User.current.admin?%>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '7' %>
<% if obj.author_id == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% when '9' %>
<% if (CourseInfos.find_by_course_id(obj.id)).try(:user_id) == User.current.id %>
<span class='del'>
<%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %>
</span>
<% end %>
<% end %>
</span>
</div>
<% end %>
<% else %>
<span style="color:#8c8a8a">
&nbsp;&nbsp;&nbsp;<%= l(:label_tags_no) %>
</span>
&nbsp;&nbsp;&nbsp;
<%= l(:label_tags_no) %>
</span>
<% end %>
<% end %>

View File

@ -4,31 +4,40 @@
<li>
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
<tr>
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %></td>
<td colspan="2" valign="top" width="50">
<%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %>
</td>
<td>
<table width="580" border="0">
<tr>
<td colspan="2" valign="top">
<span><%= link_to_course(membership.course) %></span>
<span>
<%= link_to_course(membership.course) %>
</span>
<span style="float: right">
<%= render :partial => 'courses/set_course_time', :locals => {:course => membership.course} %>
<% if User.current == @user %>
<% (membership.roles).each do |role| %>
<% unless (role == Role.find(9) || role == Role.find(3)) %>
<%= join_in_course(membership.course, User.current) %>
<% end %>
<% end %>
<% else %>
<% if (User.current == @user && (!@user.allowed_to?(:as_teacher,membership.course)))%>
<%= join_in_course(membership.course, User.current) %>
<% end %>
&nbsp;&nbsp;&nbsp;&nbsp;
<%= l(:label_x_base_courses_member, :count => membership.course.members.count) %>
(<%= "#{membership.course.members.count}" %>)&nbsp;&nbsp;
(<%= "#{membership.course.members.count}" %>)
&nbsp;&nbsp;
<%= l(:label_homework) %>
(<span class=""><%= link_to (membership.course.homeworks.count), {:controller => 'courses', :action => 'homework', :id => membership.course.id} %></span>)
(
<span class="">
<%= link_to (membership.course.homeworks.count), {:controller => 'courses', :action => 'homework', :id => membership.course.id} %>
</span>
)
&nbsp;&nbsp;
<%= l(:label_course_news) %>
(<span style="color: #ed8924"><%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %></span>)
</span></td>
(
<span style="color: #ed8924">
<%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %>
</span>)
</span>
</td>
</tr>
<tr>
<td colspan="2" width="580" style="word-break:break-all;word-wrap: break-word;">
@ -42,10 +51,14 @@
<% @course = Course.find_by_extra(membership.course.extra) %>
<% unless (@course.nil? || @course.teacher.nil? || @course.teacher.name.nil?) %>
<span class="font-lighter" style="float: left"><%= l(:label_main_teacher) %>
: <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %></span>
<span style="float: right; padding-left: 8px"><%= l(:label_course_term) %>
: <%= @course.time %><%= @course.term %></span>
<span class="font-lighter" style="float: left">
<%= l(:label_main_teacher) %>
: <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %>
</span>
<span style="float: right; padding-left: 8px">
<%= l(:label_course_term) %>
: <%= @course.time %><%= @course.term %>
</span>
<% end %>
</td>
</tr>

View File

@ -1,15 +1,15 @@
<div class="content-title-top">
<% if @memberships.empty? %>
<% if @user != User.current %>
<p class="font_description">
<%= l(:label_project_course_un) %>
</p>
<p class="font_description">
<%= l(:label_project_course_un) %>
</p>
<% else %>
<p class="font_description">
<%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
<%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
</p>
<p class="font_description">
<%= l(:label_project_cousre_studentun) %>
<%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
<%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
</p>
<% end %>
<% else %>
<div class="user_course_list menu-div">

View File

@ -9,7 +9,6 @@
$("content-title-top p:first").find("a").attr("target", "_blank");
$("#content .content_frame [color=#666666]").find("a").removeAttr("target");
$('#content .content-title-top table[width=580] td:first span:eq(1)').find("a:first").removeAttr("target");
});
</script>

View File

@ -856,10 +856,10 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked {
*******************************************************************************/
.line_block {
display: inline-block;
width: 49%;
margin: 10px auto;
width: 47%;
/*margin: 10px auto;*/
vertical-align: top;
padding: 0px 2%;
padding: 0px 1%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-box-sizing: border-box;
@ -869,6 +869,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked {
.resource_sum {
height: auto;
width: 100%;
}
.line_block p {