Conflicts: app/views/layouts/new_base_user.html.erbcxt_course
commit
5e1284605f
@ -0,0 +1,59 @@
|
||||
<% unless contributor_course_scor(course.id).count == 0 %>
|
||||
<ul class="rankList">
|
||||
<h4>课程活跃度
|
||||
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor: pointer; position:relative;">积分规则</a>
|
||||
</h4>
|
||||
<div class="numIntro undis" style="cursor:pointer;">
|
||||
<div class="active-degree-rule">
|
||||
积分规则<br/>
|
||||
资源发布:资源数 x 5 <br/>
|
||||
问答发布:发帖数 x 2 <br/>
|
||||
通知发布:通知数 x 1 <br/>
|
||||
问答回复:回复数 x 1 <br/>
|
||||
作业留言:留言数 x 1 <br/>
|
||||
通知留言:留言数 x 1 <br/>
|
||||
课程留言:留言数 x 1 <br/>
|
||||
总得分为以上得分之和</div>
|
||||
</div>
|
||||
<% contributor_course_scor(course.id).each do |contributor_score| %>
|
||||
<% total_score = contributor_score.resource_num.to_i * 5 + contributor_score.message_num.to_i * 2 +
|
||||
contributor_score.message_reply_num.to_i * 1 + contributor_score.journal_num.to_i * 1 +
|
||||
+ contributor_score.homework_journal_num.to_i * 1 + contributor_score.news_reply_num.to_i * 1 +
|
||||
contributor_score.news_num.to_i * 1 %>
|
||||
<% unless total_score ==0 %>
|
||||
<li><%=link_to image_tag(url_to_avatar(contributor_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(contributor_score.user) %>
|
||||
<p><%=link_to contributor_score.user.show_name, user_path(contributor_score.user.id), :title => contributor_score.user.show_name %></p>
|
||||
<p><span class="c_green" style="cursor:pointer">
|
||||
<a onmouseover ="message_titile_show($(this),event)" onmouseout ="message_titile_hide($(this))" class="c_green">
|
||||
<%=total_score %></a></span></p>
|
||||
<div style="display: none" class="numIntro">
|
||||
<div class="contributor-course-calculate">积分计算</div>
|
||||
<%# unless contributor_score.resource_num.to_i == 0 %>
|
||||
<div style="padding-left: 2px;padding-bottom: 2px;padding-right: 2px">
|
||||
资源发布数 x 5 = <%= contributor_score.resource_num.to_i %> x 5 = <%= contributor_score.resource_num.to_i * 5 %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.message_num.to_i == 0 %>
|
||||
问答发布数 x 2 = <%= contributor_score.message_num.to_i %> x 2 = <%= contributor_score.message_num.to_i * 2 %></br>
|
||||
通知发布数 x 1 = <%= contributor_score.news_num.to_i %> x 1 = <%= contributor_score.news_num.to_i %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.message_reply_num.to_i == 0 %>
|
||||
问答回帖数 x 1 = <%= contributor_score.message_reply_num.to_i %> x 1 = <%= contributor_score.message_reply_num.to_i %></br>
|
||||
作业留言数 x 1 = <%= contributor_score.homework_journal_num.to_i %> x 1 = <%= contributor_score.homework_journal_num.to_i %></br>
|
||||
通知留言数 x 1 = <%= contributor_score.news_reply_num.to_i %> x 1 = <%= contributor_score.news_reply_num.to_i %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.journal_num.to_i == 0 %>
|
||||
课程留言数 x 1 = <%= contributor_score.journal_num.to_i %> x 1 = <%= contributor_score.journal_num.to_i %></br>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.homework_journal_num.to_i == 0 %>
|
||||
<%# end %>
|
||||
<%# unless contributor_score.news_reply_num.to_i == 0 %>
|
||||
<%# end %>
|
||||
总得分:<%=total_score %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
@ -0,0 +1,21 @@
|
||||
<% hero_homework_scores = hero_homework_score(course, "desc") %>
|
||||
<% unless hero_homework_scores.map(&:score).detect{|s| s.to_i != 0}.nil? %>
|
||||
<ul class="rankList">
|
||||
<h4><span>课程英雄榜</span>
|
||||
<a class="contributor_course" onmouseover ="message_titile_show2($(this),event)" onmouseout ="message_titile_hide2($(this))" style="cursor:pointer;">积分规则</a></h4>
|
||||
<div style="cursor:pointer;" class="numIntro undis">
|
||||
<div class="hero-degree-rule">积分规则<br/>
|
||||
英雄榜的得分是每个同学作业的得分总和
|
||||
</div>
|
||||
</div>
|
||||
<% hero_homework_scores.each do |student_score| %>
|
||||
<% if student_score.score.to_i != 0 %>
|
||||
<li> <a href="javascript:void:(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
||||
<p><a href="javascript:void:(0);"><%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %></a></p>
|
||||
<p><span class="c_red" style="cursor:pointer" ><%= student_score.score<0 ? 0 : student_score.score.to_i %></span></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
@ -0,0 +1,9 @@
|
||||
<% if @order == "asc" %>
|
||||
按 <%= link_to "时间",params.merge(:sort => "created_on:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort => "downloads:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort => "quotes:desc", :order => order,:tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
|
||||
<% else %>
|
||||
按 <%= link_to "时间",params.merge(:sort => "created_on:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
|
||||
<%= link_to "下载次数",params.merge(:sort => "downloads:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"downloads"} %> /
|
||||
<%= link_to "引用次数",params.merge(:sort =>"quotes:asc", :order => order, :tag_name => tag_name,:name => search_name),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"quotes"} %> 排序
|
||||
<% end %>
|
@ -0,0 +1,32 @@
|
||||
<span class="add_attachment" data-containerid="<%= container.id %>">
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse_org) %></button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}','"+"submit_resource"+"');",
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:containerid => "#{container.id}"
|
||||
} %>
|
||||
</span>
|
||||
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
||||
|
||||
<span id="upload_file_count<%=container.id %>">
|
||||
建议上传高度不超过52px的图片
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
@ -0,0 +1,32 @@
|
||||
<span class="add_attachment" data-containerid="<%= container.id %>">
|
||||
<button name="button" class="sub_btn" onclick="_file<%=container.id %>.click()" onmouseover="this.focus()" style="<%= ie8? ? 'display:none' : ''%>" type="button" ><%= l(:label_browse_org) %></button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => "_file#{container.id}",
|
||||
:class => ie8? ? '':'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => "addInputFiles_board(this, '#{container.id}','"+"submit_resource"+"');",
|
||||
:style => ie8? ? '': 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js'),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all),
|
||||
:lebel_file_uploding => l(:lebel_file_uploding),
|
||||
:containerid => "#{container.id}"
|
||||
} %>
|
||||
</span>
|
||||
<!--<input type="submit" name="" value="上传文件" class="f_l ml10" style="width:80px; height:26px;">-->
|
||||
|
||||
<span id="upload_file_count<%=container.id %>">
|
||||
建议上传 长度为1452px/高度为304px 的图片
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<span id="attachments_fields<%= container.id %>" data-containerid="<%= container.id %>" xmlns="http://www.w3.org/1999/html">
|
||||
</span>
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||
<div class="upload_con">
|
||||
<h2 style="text-align: center">更换Logo</h2>
|
||||
<div class="upload_box">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
<%= form_tag(organization_files_path(org, :in_org => params[:in_org], :logo => true), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
|
||||
<%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_org_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_resource()
|
||||
{
|
||||
$('#submit_org_resource').parent().submit();
|
||||
}
|
||||
</script>
|
@ -0,0 +1,25 @@
|
||||
<div id="popbox_upload" class="mb10" style="margin-top: -30px;color:#15bccf; font-size:16px;">
|
||||
<div class="upload_con">
|
||||
<h2 style="text-align: center">更换背景图片</h2>
|
||||
<div class="upload_box">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
<%= form_tag(organization_files_path(org, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
|
||||
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
|
||||
<%= render :partial => 'files/org_upload_attachment_list_banner', :locals => {:container => org}%>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_org_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function submit_resource()
|
||||
{
|
||||
$('#submit_org_resource').parent().submit();
|
||||
}
|
||||
</script>
|
@ -1,71 +1,75 @@
|
||||
<% if @addTag%>
|
||||
<% if @obj_flag == '3'%>
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
<% if @obj_flag == '3'%>
|
||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
//$('#put-tag-form-issue').hide();
|
||||
$('#name-issue').val("");
|
||||
<% elsif @obj_flag == '6'%>
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||
<% else %>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide();
|
||||
$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val("");
|
||||
<% else %>
|
||||
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||
$('#put-tag-form #name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
||||
$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>');
|
||||
$('#put-tag-form #name').val("");
|
||||
//$('#put-tag-form').hide();
|
||||
<% end %>
|
||||
<% else %>
|
||||
$("#attachments_fields").children().remove();
|
||||
$("#upload_file_count").text("未上传文件");
|
||||
$('#upload_file_div').slideToggle('slow');
|
||||
<% if @project %>
|
||||
hideModal();
|
||||
<% if @in_project_toolbar %>
|
||||
window.location.href = '<%= project_files_path(@project) %>'
|
||||
<% else %>
|
||||
<% if @project %>
|
||||
hideModal();
|
||||
<% if @in_project_toolbar %>
|
||||
window.location.href = '<%= project_files_path(@project) %>'
|
||||
<% else %>
|
||||
|
||||
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
|
||||
$("#project_files_count_info").html("<%= @all_attachments.count %>");
|
||||
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%elsif @course%>
|
||||
hideModal();
|
||||
<%if @in_course_toolbar %>
|
||||
window.location.href='<%= course_files_path(@course)%>'
|
||||
<%else%>
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<%end%>
|
||||
<% elsif @org_subfield %>
|
||||
<% if params[:in_org] %>
|
||||
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
|
||||
<%else %>
|
||||
hideModal();
|
||||
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>');
|
||||
$("#project_files_count_info").html("<%= @all_attachments.count %>");
|
||||
$("#project_files_count_nav").html("(<%= @all_attachments.count %>)")
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%elsif @course%>
|
||||
hideModal();
|
||||
<%if @in_course_toolbar %>
|
||||
window.location.href='<%= course_files_path(@course)%>'
|
||||
<%else%>
|
||||
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
|
||||
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
|
||||
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<%end%>
|
||||
<% elsif @org_subfield %>
|
||||
<% if params[:in_org] %>
|
||||
window.location.href = '<%= org_subfield_files_path @org_subfield %>';
|
||||
<%else %>
|
||||
hideModal();
|
||||
$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>');
|
||||
// 添加文件上传成功提示,
|
||||
<% unless params[:attachments].nil? %>
|
||||
// var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
// $("#org_subfield_list").prepend(div);
|
||||
// setTimeout( function(){div.remove();},3000);
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif @organization %> //组织单独处理
|
||||
hideModal();
|
||||
window.location.href = '<%= organization_path @organization %>';
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'org_subfield_list',
|
||||
:locals => {org_subfield: @org_subfield,all_attachments: @result,sort:@sort,order:@order,org_subfield_attachments:@searched_attach})%>");
|
||||
$("#attachment_count").html("<%= @result.count %>");
|
||||
$("#attachment_count").html("<%= @result.count %>");
|
||||
$("#org_sort").html("<%= escape_javascript(render :partial => 'org_order_filter',
|
||||
:locals => {:sort => @sort, :order => @order, :tag_name => @tag_name,:search_name => @q}) %>");
|
@ -0,0 +1,3 @@
|
||||
$("#subfield_show_<%= @subfield.id %>").html("<%= @subfield.name %>");
|
||||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
@ -0,0 +1,48 @@
|
||||
<% if User.current.logged? %>
|
||||
<div class="navHomepageProfile" id="navHomepageProfile">
|
||||
<ul>
|
||||
<li class="homepageProfileMenuIcon fr" id="homepageProfileMenuIcon">
|
||||
<%= link_to "<div class='mt5 mb8 user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
|
||||
<%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %>
|
||||
<ul class="topnav_login_list none" id="topnav_login_list">
|
||||
<li>
|
||||
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "新建组织", new_organization_path, :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="login fr" >
|
||||
<a href="<%= signin_url_without_domain %>" class=" " >登录 | </a>
|
||||
<a href="<%= register_url_without_domain %>" class=" " >退出</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#navHomepageProfile").mouseenter(function(){
|
||||
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
|
||||
$("#topnav_login_list").show();
|
||||
});
|
||||
$("#navHomepageProfile").mouseleave(function(){
|
||||
$("#homepageProfileMenuIcon").removeClass("homepageProfileMenuIconhover");
|
||||
$("#topnav_login_list").hide();
|
||||
});
|
||||
|
||||
function signout(){
|
||||
$.post(
|
||||
'<%= signout_path%>',
|
||||
{}
|
||||
);
|
||||
}
|
||||
</script>
|
@ -0,0 +1,80 @@
|
||||
<% activities.each do |act| %>
|
||||
<% if act.org_act_type == "HomeworkCommon" %>
|
||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.updated_at %></span>
|
||||
<span> 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.journals_for_messages.count %></span> </p>
|
||||
</div>
|
||||
|
||||
</div><!--row-ziyuan end-->
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% end %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
|
||||
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.children.count %></span> </p>
|
||||
</div>
|
||||
|
||||
</div><!--row-ziyuan end-->
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.created_on %></span>
|
||||
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.comments.count %></span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||
<% if ( activity.polls_status==2) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<% if has_commit %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "fl note-title" %>
|
||||
<% else %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank', :class => "fl note-title" %>
|
||||
<% end %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.published_at %></span>
|
||||
<span> 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user) : activity.try(:user).try(:realname) %></span>
|
||||
<span class="fr right-info2"> 0 </span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
||||
<% elsif act.org_act_type == "Course" %>
|
||||
<% activity = Course.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.teacher),:width => "40", :height => "40"), user_path(activity.teacher), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to activity.name.to_s, course_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.created_at %></span>
|
||||
<span> 作者:<%= activity.try(:teacher).try(:realname).nil? ? activity.try(:teacher) : activity.try(:teacher).try(:realname) %></span>
|
||||
<span class="fr right-info2"> 0</span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
@ -0,0 +1,5 @@
|
||||
<a href="#" target="_blank" class="row-con">
|
||||
<span class="row-time"><%= format_date(activity.updated_at) %></span>
|
||||
<h3 class="row-title "><%= activity.title %></h3>
|
||||
<div class="row-txt row-txt-line"><%= activity.description %></div>
|
||||
</a>
|
@ -0,0 +1,20 @@
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||
<!--<img width="370" height="220" src="/files/uploads/image<%#= iamge_path %>" alt="" />-->
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<span><%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %></span>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_at %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.journals_for_messages.count %></span></div>
|
||||
</div>
|
||||
</a>
|
@ -0,0 +1,22 @@
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% end %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
@ -0,0 +1,19 @@
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<span><%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %></span>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
|
||||
</div>
|
||||
</a>
|
@ -0,0 +1,107 @@
|
||||
<% activities.each do |act| %>
|
||||
<% if act.org_act_type == "HomeworkCommon" %>
|
||||
<% activity = HomeworkCommon.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||
<!--<img width="370" height="220" alt="#" src="/images/org_new_style/default-img.jpg">-->
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %>
|
||||
<!--<img width="370" height="220" src="/files/uploads/image<%#= iamge_path %>" alt="" />-->
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_at %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.journals_for_messages.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% end %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||
<% if ( activity.polls_status==2) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.polls_description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if has_commit %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank' %>
|
||||
<% end %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.published_at %></span></p>
|
||||
<div class="fr right-info"> <span> 0 </span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
@ -0,0 +1,12 @@
|
||||
<div class="cl"></div>
|
||||
<div style="margin-top: 10px">
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<img src="/images/org_new_style/default-img.jpg" alt="" class="fl con-left-img"/>
|
||||
<% else %>
|
||||
<img src="/files/uploads/image<%= iamge_path %>" alt="" class="fl con-left-img"/>
|
||||
<% end %>
|
||||
<%=link_to activity.content.html_safe, organization_path(organization, :org_subfield_id => field.id), :class => "con-left-txt fl", :target => "_blank" %>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
@ -0,0 +1,74 @@
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||
<% document = activity.org_act %>
|
||||
<% org_subfield_id = params[:org_subfield_id] %>
|
||||
<% flag = 2 %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(document.creator),:width => "40", :height => "40"), user_path(document.creator), :class => "fl user-img" %>
|
||||
<div class="note-box fl">
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date document.created_at %></span>
|
||||
<span> 作者:<%= document.try(:creator).try(:realname).nil? ? document.try(:creator).try(:login) : document.try(:creator).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= document.children.count %></span> </p>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif activity.container_type == 'OrgSubfield' %>
|
||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||
<% message = Message.find(activity.org_act_id) %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(message.author),:width => "40", :height => "40"), user_path(message.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<% if message.parent_id.nil? %>
|
||||
<%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% end %>
|
||||
<%#= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date message.created_on %></span>
|
||||
<span> 作者:<%= message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= message.children.count %></span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% else %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(message.author),:width => "40", :height => "40"), user_path(message.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<% if message.parent_id.nil? %>
|
||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :target => '_blank', :class => "fl note-title" %>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "fl note-title" %>
|
||||
<% end %>
|
||||
<%#= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date message.updated_at %></span>
|
||||
<span> 作者:<%= message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= message.children.count %></span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||
<% news = News.find(activity.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(news.author),:width => "40", :height => "40"), user_path(news.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to news.title.to_s, news_path(news), :target => '_blank', :class => "fl note-title" %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date news.created_on %></span>
|
||||
<span> 作者:<%= news.try(:author).try(:realname).nil? ? news.try(:author).try(:login) : news.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= news.comments.count %></span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,124 @@
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||
<% document = activity.org_act %>
|
||||
<% org_subfield_id = params[:org_subfield_id] %>
|
||||
<% flag = 2 %>
|
||||
<li>
|
||||
<a href="/#" title="" >
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5><%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
|
||||
<span><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank' %></span>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to document.try(:creator).try(:realname).nil? ? document.try(:creator).try(:login) : document.try(:creator).try(:realname), user_path(document.creator), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date document.created_at %></span></p>
|
||||
<div class="fr right-info"> <span> <%= document.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif activity.container_type == 'OrgSubfield' %>
|
||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||
<% message = Message.find(activity.org_act_id) %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<li>
|
||||
<a href="/#" title="" >
|
||||
<div class="course-list-img">
|
||||
<% if message.parent_id.nil? %>
|
||||
<% content = message.content%>
|
||||
<% else %>
|
||||
<% content = message.parent.content%>
|
||||
<% end %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if message.parent_id.nil? %>
|
||||
<span><%= link_to message.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank' %></span>
|
||||
<% else %>
|
||||
<span><%= link_to message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => '_blank'%></span>
|
||||
<% end %>
|
||||
<%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
|
||||
<%#= link_to document.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname), user_path(message.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date message.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= message.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<a href="/#" title="" >
|
||||
<div class="course-list-img">
|
||||
<% if message.parent_id.nil? %>
|
||||
<% content = message.content%>
|
||||
<% else %>
|
||||
<% content = message.parent.content%>
|
||||
<% end %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if message.parent_id.nil? %>
|
||||
<%= link_to message.subject.to_s.html_safe, board_message_path(message.board,message), :class=> "postGrey"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :class=> "postGrey"
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
|
||||
<%#= link_to document.subject, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to message.try(:author).try(:realname).nil? ? message.try(:author).try(:login) : message.try(:author).try(:realname), user_path(message.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date message.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= message.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||
<% news = News.find(activity.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="" >
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_path(news), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_path(news), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5><%#= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
|
||||
<span><%= link_to news.title.to_s, news_path(news), :target => '_blank' %></span>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to news.try(:author).try(:realname).nil? ? news.try(:author).try(:login) : news.try(:author).try(:realname), user_path(news.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date news.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= news.comments.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
<a href="#" target="_blank">
|
||||
<div class="con-r-img fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator) %>
|
||||
<span class="con-name"><%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %></span></div>
|
||||
<p class="fr"><%= activity.content.html_safe %></p>
|
||||
</a>
|
@ -0,0 +1,49 @@
|
||||
<% activities.each do |act| %>
|
||||
<% if act.org_act_type == "Issue" %>
|
||||
<% activity = Issue.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<%#= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
|
||||
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.journals.count %></span> </p>
|
||||
</div>
|
||||
|
||||
</div><!--row-ziyuan end-->
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<% end %>
|
||||
<%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.updated_on %></span>
|
||||
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.children.count %></span> </p>
|
||||
</div>
|
||||
|
||||
</div><!--row-ziyuan end-->
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="note-box fl">
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>
|
||||
<p class="fl"><span >发布时间:<%= format_date activity.created_on %></span>
|
||||
<span> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %></span>
|
||||
<span class="fr right-info2"> <%= activity.comments.count %></span> </p>
|
||||
</div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
@ -0,0 +1,17 @@
|
||||
<div class="article-rwrap">
|
||||
<h3 class="item-title-r">
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :class => "title-detail-r" %>
|
||||
</h3>
|
||||
<div class="item-btm clearfix">
|
||||
<ul class="fl left-info">
|
||||
<li class="hd-pic">
|
||||
<%= link_to activity.author.realname.nil? ? activity.author.login : activity.author.realname, user_path(activity.author), :class => "publisher-name fl", :target => "_blank" %>
|
||||
</li>
|
||||
<li class="pass-time"><span><%= format_date(activity.updated_on) %></span></li>
|
||||
</ul>
|
||||
<div class="fr right-info">
|
||||
<span> <%= activity.journals.count %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
@ -0,0 +1,49 @@
|
||||
<div class="item-img fr">
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<img src="/images/org_new_style/default-img.jpg" width="180" height="115">
|
||||
<% else %>
|
||||
<img src="/files/uploads/image<%= iamge_path %>" width="180" height="115">
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div class="article-lwrap clearfix">
|
||||
<div class="item-txt fl">
|
||||
<h3 class="item-title">
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class => "title-detail" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class => "title-detail" %>
|
||||
<% end %>
|
||||
</h3>
|
||||
<% if activity.parent_id.nil? %>
|
||||
<% content = activity.content %>
|
||||
<% else %>
|
||||
<% content = activity.parent.content %>
|
||||
<% end %>
|
||||
<div class="item-bd">
|
||||
<span class="fl"><%= content.to_s.html_safe %></span>
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= link_to "[查看全文]", board_message_url_in_org(activity.board.id,activity.id), :class => "read-more fl" %>
|
||||
<% else %>
|
||||
<%= link_to "[查看全文]", board_message_url_in_org(activity.board.id,activity.id), :class => "read-more fl" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="item-btm clearfix">
|
||||
<ul class="fl left-info">
|
||||
<li class="hd-pic">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author),:width => "20", :height => "20"), user_path(activity.author), :class => "publisher-hd fl", :target => "_blank" %>
|
||||
<a class="publisher-name fl" href="#" target="_blank">
|
||||
<%= link_to activity.author.realname.nil? ? activity.author.login : activity.author.realname, user_path(activity.author), :class => "publisher-name fl", :target => "_blank" %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="pass-time"><span><%= format_date(activity.updated_on) %></span></li>
|
||||
</ul>
|
||||
<div class="fr right-info">
|
||||
<span> <%= activity.children.count %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -0,0 +1,77 @@
|
||||
|
||||
<% activities.each do |act| %>
|
||||
<% if act.org_act_type == "Issue" %>
|
||||
<% activity = Issue.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.journals.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %>
|
||||
<% end %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.updated_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.children.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
<li>
|
||||
<a href="/#" title="">
|
||||
<div class="course-list-img">
|
||||
<% iamge_path = get_image_path_from_content(activity.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5>
|
||||
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
|
||||
</h5>
|
||||
<div class="item-btm clearfix">
|
||||
<%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %></a>
|
||||
<p class="pass-time fl"><span><%= format_date activity.created_on %></span></p>
|
||||
<div class="fr right-info"> <span> <%= activity.comments.count %></span></div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
@ -0,0 +1,14 @@
|
||||
<% org_attachs.each do |attach| %>
|
||||
<div class="row-ziyuan fl">
|
||||
<%= link_to image_tag(url_to_avatar(attach.author),:width => "40", :height => "40"), user_path(attach.author), :class => "fl user-img" %>
|
||||
<!--<a href="#" class="fl user-img" ><img src="images/detailimg4.jpg" /></a>-->
|
||||
<div class="ziyuan-box fl">
|
||||
<%= link_to truncate(attach.filename,length: 35, omission: '...'),
|
||||
download_named_attachment_path(attach.id, attach.filename),
|
||||
:title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :class => "fl ziyuan-title" %>
|
||||
<p class="fl"><span >上传时间:<%= format_date attach.created_on %></span><span>类型:<%= attach.tag_list[0] %></span><span> 下载次数:<%= attach.downloads%></span> <span>引用:<%= attach.quotes.nil? ? 0:attach.quotes %></span></p>
|
||||
</div>
|
||||
<%= link_to "下载", download_named_attachment_path(attach.id, attach.filename), :class => "download-btn fl" %>
|
||||
<div class="cl"></div>
|
||||
</div><!--row-ziyuan end-->
|
||||
<% end %>
|
@ -1,2 +1,2 @@
|
||||
$("#hide_<%= @org_subfield.id %>").text("设为可见");
|
||||
$("#hide_<%= @org_subfield.id %>").text("可见");
|
||||
$("#org_subfield_<%= @org_subfield.id %>").css("display", "none");
|
@ -1,2 +1,2 @@
|
||||
$("#hide_<%= @org_subfield.id %>").text("设为隐藏");
|
||||
$("#hide_<%= @org_subfield.id %>").text("隐藏");
|
||||
$("#org_subfield_<%= @org_subfield.id %>").css("display", "block");
|
@ -0,0 +1,111 @@
|
||||
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
||||
<div id = "container" style="max-width:360px;min-height:400px;width:370px;float: left">
|
||||
</div>
|
||||
<div id = "container_code" style="max-width:360px;min-height:400px;width:370px;float: left">
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#container_code').highcharts({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
title: {
|
||||
text: '版本库代码提交量'
|
||||
},
|
||||
subtitle: {
|
||||
// text: 'Source: WorldClimate.com'
|
||||
},
|
||||
xAxis: {
|
||||
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '代码行数'
|
||||
}
|
||||
},
|
||||
credits:{
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false,
|
||||
formatter: function() {
|
||||
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
enabled: true
|
||||
},
|
||||
enableMouseTracking: false
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '改动或增加',
|
||||
color: '#fd9e04',
|
||||
|
||||
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
|
||||
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
color: '#46baed ',
|
||||
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>
|
||||
},{
|
||||
name: '总变更',
|
||||
color: '#d397d5',
|
||||
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>
|
||||
}]
|
||||
});
|
||||
|
||||
// 代码提交次数统计
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
credits:{
|
||||
enabled: false
|
||||
},
|
||||
title: {
|
||||
text: '版本库代码提交次数'
|
||||
},
|
||||
subtitle: {
|
||||
// text: 'Source: WorldClimate.com'
|
||||
},
|
||||
xAxis: {
|
||||
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '次'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false,
|
||||
formatter: function() {
|
||||
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
enabled: true
|
||||
},
|
||||
enableMouseTracking: false
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '提交次数',
|
||||
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
|
||||
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>
|
||||
}
|
||||
// {
|
||||
// name: 'London',
|
||||
// data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
|
||||
// }
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
@ -1,30 +1,123 @@
|
||||
<div class="project_r_h">
|
||||
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
||||
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
|
||||
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
|
||||
</div>
|
||||
<% if @status_commit_count ==0 %>
|
||||
<div class="flash notice">该项目目前还没有提交过代码!</div>
|
||||
<% if false %>
|
||||
<div class="flash notice">请在版本库中提交代码,统计信息将更准确</div>
|
||||
<% else %>
|
||||
<div class="riviseRed fl"></div><div class="fl">修订 是版本库的提交次数, 显示为橘红色。</div><br>
|
||||
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
|
||||
<div class="repository_con " style="line-height:1.9;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<div id = "container">
|
||||
</div>
|
||||
<div id = "container_code" class="mt30">
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#container_code').highcharts({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
title: {
|
||||
text: '代码提交量'
|
||||
},
|
||||
subtitle: {
|
||||
// text: 'Source: WorldClimate.com'
|
||||
},
|
||||
xAxis: {
|
||||
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '代码行数'
|
||||
}
|
||||
},
|
||||
credits:{
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false,
|
||||
formatter: function() {
|
||||
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
enabled: true
|
||||
},
|
||||
enableMouseTracking: false
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '改动或增加',
|
||||
|
||||
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
|
||||
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>
|
||||
},{
|
||||
name: '总变更',
|
||||
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>
|
||||
}]
|
||||
});
|
||||
|
||||
// 代码提交次数统计
|
||||
$('#container').highcharts({
|
||||
chart: {
|
||||
type: 'line'
|
||||
},
|
||||
credits:{
|
||||
enabled: false
|
||||
},
|
||||
title: {
|
||||
text: '代码提交次数'
|
||||
},
|
||||
subtitle: {
|
||||
// text: 'Source: WorldClimate.com'
|
||||
},
|
||||
xAxis: {
|
||||
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
||||
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: '次'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
enabled: false,
|
||||
formatter: function() {
|
||||
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
line: {
|
||||
dataLabels: {
|
||||
enabled: true
|
||||
},
|
||||
enableMouseTracking: false
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
name: '提交次数',
|
||||
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
|
||||
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>
|
||||
}
|
||||
// {
|
||||
// name: 'London',
|
||||
// data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
|
||||
// }
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<p style="padding-top:35px;">
|
||||
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户每月提交代码次数 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户最近六个月的提交次数 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户最近六个月的代码量 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
|
||||
</p>
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||
<% end %>
|
@ -1,5 +1,5 @@
|
||||
<% if is_praise_homework User.current.id,@work.id %>
|
||||
<%= link_to "赞(#{praise_homework_count @work.id})",praise_student_work_student_work_path(@work), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
|
||||
<% if is_praise_homework User.current.id,work.id %>
|
||||
<%= link_to "赞(#{praise_homework_count work.id})",praise_student_work_student_work_path(work), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
|
||||
<% else %>
|
||||
<%= link_to "赞(#{praise_homework_count @work.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
|
||||
<%= link_to "赞(#{praise_homework_count work.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
|
||||
<% end %>
|
@ -1 +1 @@
|
||||
$('#student_work_praise_<%= @work.id%>').html('<%= escape_javascript(render :partial => 'student_work/student_work_praise')%>');
|
||||
$('#student_work_praise_<%= @work.id%>').html('<%= escape_javascript(render :partial => 'student_work/student_work_praise', :locals => {:work => @work})%>');
|
@ -0,0 +1,28 @@
|
||||
|
||||
<%= form_tag add_exist_file_to_course_user_path(user, :type => defined?(type) ? type : "6" ),:remote=>true,:id=>'course_list_form' do %>
|
||||
<div>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !courses.empty? %>
|
||||
<% courses.each do |course| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||
</li>
|
||||
<li class="sendCourseName"><%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
|
||||
</div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
@ -0,0 +1,27 @@
|
||||
<%= form_tag share_message_to_course_user_path(user), :remote => true, :id => 'course_list_form' %>
|
||||
<div>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !courses.empty? %>
|
||||
<% courses.each do |course| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||
</li>
|
||||
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+course.time.to_s+course.term + ']' %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
|
||||
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
@ -0,0 +1,27 @@
|
||||
<%= form_tag share_news_to_course_user_path(user), :remote => true, :id => 'course_list_form' %>
|
||||
<div>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !courses.empty? %>
|
||||
<% courses.each do |course| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="course_ids[]" type="checkbox" value="<%= course.id %>" class="courseSendCheckbox"/>
|
||||
</li>
|
||||
<li class="sendCourseName"><%= truncate(course.name, :lendght => 25) + '['+course.time.to_s+course.term + ']' %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="courseSendSubmit">
|
||||
<!--<a href="javascript:void(0);" class="sendSourceText">确定</a>-->
|
||||
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();' %>
|
||||
</div>
|
||||
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText mt10" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
@ -0,0 +1,32 @@
|
||||
<%= form_tag add_exist_file_to_org_user_path(user, :type => defined?(type) ? type : "6" ),:remote=>true,:id=>'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
|
||||
<ul class="fontGrey3 sectionContent">
|
||||
<% unless orgs.empty? %>
|
||||
<% orgs.each do |org|%>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id)%>')" class="mt3 fl mr5" />
|
||||
<span><%= org.name%></span></label>
|
||||
</li>
|
||||
<%end%>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="columnWrap">
|
||||
<ul class="columnContent">
|
||||
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
|
||||
<div class="courseSendSubmit mr15">
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%end %>
|
@ -0,0 +1,31 @@
|
||||
<%= form_tag share_message_to_org_user_path(user), :remote => true, :id => 'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
<ul class="fontGrey3 sectionContent">
|
||||
<% unless orgs.empty? %>
|
||||
<% orgs.each do |org| %>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="org_id" value="<%= org.id %>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5"/>
|
||||
<span><%= org.name %></span></label>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="columnWrap">
|
||||
<ul class="columnContent">
|
||||
<%= render :partial => 'users/org_resources_subfield', :locals => {:subfield => nil} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
|
||||
<div class="courseSendSubmit mr15">
|
||||
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();', :onclick => "check_des(event);" %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
@ -0,0 +1,32 @@
|
||||
<%= form_tag share_news_to_org_user_path(user), :remote => true, :id => 'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
|
||||
<ul class="fontGrey3 sectionContent">
|
||||
<% unless orgs.empty? %>
|
||||
<% orgs.each do |org| %>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="org_id" value="<%= org.id %>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id,:send_type => params[:send_type])%>')" class="mt3 fl mr5"/>
|
||||
<span><%= org.name %></span></label>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="columnWrap">
|
||||
<ul class="columnContent">
|
||||
<%= render :partial => 'users/org_resources_subfield', :locals => {:subfield => nil} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
|
||||
<div class="courseSendSubmit mr15">
|
||||
<%= submit_tag '确定', :class => 'sendSourceText', :onfocus => 'this.blur();', :onclick => "check_des(event);" %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue