Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
6b5f1827a6
|
@ -74,7 +74,7 @@ class NewsController < ApplicationController
|
|||
|
||||
def new
|
||||
@news = News.new(:project => @project, :author => User.current)
|
||||
@course_tag = @project.project_type
|
||||
@course_tag = @project.project_type
|
||||
if @course_tag
|
||||
render :layout => 'base_courses'
|
||||
end
|
||||
|
@ -89,7 +89,8 @@ class NewsController < ApplicationController
|
|||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to project_news_index_path(@project)
|
||||
else
|
||||
render :action => 'new'
|
||||
layout_file = (@project.project_type == 1) ? 'base_courses' : 'base_projects'
|
||||
render :action => 'new', :layout => layout_file
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -129,8 +129,16 @@ module BidsHelper
|
|||
def im_watching_student_id? bid
|
||||
people = []
|
||||
people << bid.author
|
||||
bid.join_in_contests.each do |jic|
|
||||
people << jic.user
|
||||
case bid.reward_type # 天煞的bid分了三用途,里面各种hasmany还不定能用!
|
||||
when 1
|
||||
when 2
|
||||
bid.join_in_contests.each do |jic|
|
||||
people << jic.user
|
||||
end
|
||||
when 3
|
||||
people += bid.courses.first.users.to_a
|
||||
else
|
||||
raise 'bids_helper: unknow bid type' # 出了错看这里!不知道的抛异常,省的找不到出错的地方!
|
||||
end
|
||||
people.include?(User.current)
|
||||
end
|
||||
|
|
|
@ -74,17 +74,31 @@ module WelcomeHelper
|
|||
def show_user_content event
|
||||
str = ' '.html_safe
|
||||
case event.event_type
|
||||
when 'news' , 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
||||
when 'news'
|
||||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||
when 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
when 'reply' ,'Reply', 'Memo'
|
||||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||
when 'attachment'
|
||||
str << content_tag('span', '上传了') << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color")
|
||||
str << content_tag('span', '上传了') <<
|
||||
content_tag('span', find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) <<
|
||||
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color")
|
||||
else
|
||||
str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
||||
str << content_tag("span", "更新了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
end
|
||||
str
|
||||
rescue Exception => e
|
||||
|
@ -94,10 +108,12 @@ module WelcomeHelper
|
|||
def show_event_reply event
|
||||
str = "回复("
|
||||
case event.event_type
|
||||
when 'news'
|
||||
str << link_to( event.comments.count, news_path(event)) << ")"
|
||||
when "issue"
|
||||
str << link_to(cal_issues_count(event), issue_path(event), :target => "_blank" ) << ")"
|
||||
str << link_to(cal_issues_count(event), issue_path(event)) << ")"
|
||||
when "Memo"
|
||||
str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id), :target => "_blank" ) << ")"
|
||||
str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id)) << ")"
|
||||
else
|
||||
str = ""
|
||||
end
|
||||
|
|
|
@ -28,7 +28,15 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
|
||||
# default_scope { where('m_parent_id IS NULL') }
|
||||
|
||||
def remove_by_user? user
|
||||
def self.create_by_user? user
|
||||
if user.anonymous?
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
def self.remove_by_user? user
|
||||
if( self.user == user ||
|
||||
( self.jour.kind_of?(User) && self.jour== user )
|
||||
)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% tip1 = (@bid.reward_type == 3) ? l(:label_student_response) : l(:label_user_response) %>
|
||||
<p class="font_lighter" style="font-size: 15px; padding-left: 85px; "><%=tip1%></p>
|
||||
|
||||
|
@ -29,23 +30,27 @@
|
|||
<span class="font_lighter"><%= l(:label_bids_published) %> <%= time_tag(journal.created_on).html_safe %> <%= l(:label_bids_published_ago) %></span>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
|
||||
:method => 'post', :title => l(:button_quote))%>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;"}
|
||||
%>
|
||||
<% end %>
|
||||
<% if @user==User.current|| User.current.admin? %>
|
||||
<%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
|
||||
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
||||
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<% display_id = im_watching_student_id? @bid%>
|
||||
<% @homework_list.each do |homework|%>
|
||||
<% if homework.attachments.any?%>
|
||||
<table width="660px" border="0" align="center">
|
||||
|
@ -24,7 +25,11 @@
|
|||
<td colspan="2" valign="top"><strong> <%= link_to homework.user, user_path(homework.user)%></strong> <span class="font_lighter">提交了作业</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong><%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%></td>
|
||||
<td colspan="2" valign="top">
|
||||
<% if display_id %>
|
||||
<strong><%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" >
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<div style="margin-left: 20px;">
|
||||
<span class="portrait"><%= image_tag(url_to_avatar(@bid.author), :class => "avatar")%></span>
|
||||
<span class="body">
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<td>
|
||||
<p>
|
||||
<div class="font_lighter" style="font-size: 13px;">
|
||||
<%= link_to '创建项目', new_project_path, :target=>'_blank'%>
|
||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<!-- <%= watcher_link(@board, User.current) %> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<div id="add-message" style="display:none;">
|
||||
<div id="add-message" class="add_frame" style="display:none;">
|
||||
<% if User.current.logged? %>
|
||||
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> » <%= l(:label_message_new) %></h3>
|
||||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create) %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form') %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<%= form_tag({}) do -%>
|
||||
<%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
|
||||
<div class="autoscroll">
|
||||
<ul>
|
||||
<% issue_list(issues) do |issue, level| -%>
|
||||
|
@ -58,4 +56,3 @@
|
|||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
|
@ -4,7 +4,7 @@
|
|||
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
|
||||
|
||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||
:onclick => '$("#custom_query").slideToggle(); ' if User.current.logged? %>
|
||||
:onclick => '$("#custom_query").slideToggle(400); ' if User.current.logged? %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
|||
</div>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
|
||||
<div style="clear:right; ">
|
||||
<%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
|
||||
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
||||
<span>---<%= l :label_query_new %>---</span>
|
||||
<span>---<%= l :label_query_new %>---</span>
|
||||
<div id="query_form_content" class="hide-when-print">
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
|
@ -59,6 +59,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ end %>
|
|||
|
||||
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||||
|
||||
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||
<% if false # !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||
<hr />
|
||||
<div id="issue_tree">
|
||||
<div class="contextual">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<%= error_messages_for 'message' %>
|
||||
<div class="add_frame_header" >
|
||||
<%= l(:label_message_new) %>
|
||||
</div>
|
||||
<% replying ||= false %>
|
||||
|
||||
<div class="box">
|
||||
<div class="box ">
|
||||
<!--[form:message]-->
|
||||
<p><label for="message_subject"><%= l(:field_subject) %></label><br />
|
||||
<%= f.text_field :subject, :style => "width:658px;", :id => "message_subject" %><!--by young-->
|
||||
<%= f.text_field :subject,:size => 60, :style => "width:490px;", :id => "message_subject" %><!--by young-->
|
||||
|
||||
<% unless replying %>
|
||||
<% if @message.safe_attribute? 'sticky' %>
|
||||
|
@ -23,7 +26,7 @@
|
|||
|
||||
<p>
|
||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content' %></p>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %></p>
|
||||
<%= wikitoolbar_for 'message_content' %>
|
||||
<!--[eoform:message]-->
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<%= error_messages_for @news %>
|
||||
|
||||
<div class="add_frame_header" >
|
||||
<% str = (@project.project_type == 1) ? l(:bale_news_notice) : l(:label_news_new) %>
|
||||
<%= str %>
|
||||
</div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %></p>
|
||||
<!-- <p style="margin-left:-10px;"><%= f.text_area :summary, :cols => 60, :rows => 2, :style => "width:490px;margin-left:10px;" %></p> -->
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit', :style => "width:490px;" %></p>
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %></p>
|
||||
<p id="attachments_form" style="margin-left:-10px;"><label style="padding-right: 15px;"><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
<!-- added by huang -->
|
||||
<%
|
||||
if @project.project_type == 1
|
||||
btn_tips = l(:label_news_notice)
|
||||
label_tips = l(:label_course_news)
|
||||
else
|
||||
btn_tips = l(:label_news_new)
|
||||
label_tips = l(:label_news)
|
||||
end
|
||||
%>
|
||||
<% if @project && User.current.allowed_to?(:manage_news, @project) %>
|
||||
<div class="content-title-top">
|
||||
<% if @project.project_type == 1%>
|
||||
<%= link_to(l(:label_news_notice),
|
||||
<%= link_to(btn_tips,
|
||||
new_project_news_path(@project),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_news_new),
|
||||
new_project_news_path(@project),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
||||
<% end %>
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
|
||||
</div>
|
||||
|
||||
<div id="add-news" style="display:none;">
|
||||
<% if @project.project_type == 1 %>
|
||||
<h3><%= l(:bale_news_notice)%></h3>
|
||||
<% else %>
|
||||
<h3><%= l(:label_news_new)%></h3>
|
||||
<% end %>
|
||||
<div id="add-news" class="add_frame" style="display:none;">
|
||||
<%= labelled_form_for @news, :url => project_news_index_path(@project),
|
||||
:html => { :id => 'news-form', :multipart => true } do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create), :class => 'button-submit', :name => nil %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
|
||||
<%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit --> |
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' ,target='preview',{:class => 'whiteButton m3p10'}%> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' ,:class => 'whiteButton m3p10' %>
|
||||
<% end if @project %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!--add by huang :list news-->
|
||||
<h3 style="font-weight:bold; border-bottom:1px solid #f0f0f0"><%=label_tips%></h3>
|
||||
<div>
|
||||
<% if @newss.empty? %>
|
||||
<p class="nodata">
|
||||
|
@ -50,7 +50,7 @@
|
|||
<% else %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong><%= link_to_user(news.author)if news.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_newshare)%></span><span> <%= link_to h(news.title), news_path(news) %></span>
|
||||
<span style="float: right"> <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %> </span></td>
|
||||
<span style="float: right" class='delete_icon'> <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %> </span></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
|
@ -85,3 +85,16 @@
|
|||
|
||||
<% html_title(l(:label_news_plural)) -%>
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function($) {
|
||||
$('.content-text-list').each(function(){
|
||||
$(this).find('.delete_icon').hide();
|
||||
$(this).mouseenter(function(event) {
|
||||
$(this).find('.delete_icon').show();
|
||||
});
|
||||
$(this).mouseleave(function(event) {
|
||||
$(this).find('.delete_icon').hide();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<h3><%=l(:label_news_new)%></h3>
|
||||
<!-- <h3><%=l(:label_news_new)%></h3> -->
|
||||
|
||||
<%= labelled_form_for @news, :url => project_news_index_path(@project),
|
||||
:html => { :id => 'news-form', :multipart => true } do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create), :class => "enterprise" %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' ,target='preview',{:class => 'whiteButton m3p10'}%>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => ''} %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -36,17 +36,27 @@ function checkMaxLength() {
|
|||
|
||||
</script>
|
||||
<!-- fq -->
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<% if @jour.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
|
@ -55,23 +65,26 @@ function checkMaxLength() {
|
|||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||
<span class="body">
|
||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||
<span class="font_lighter"><%= l(:label_projects_feedback) %></span>
|
||||
<%= textilizable journal.notes%>
|
||||
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
||||
<% id = 'project_respond_form_'+journal.id.to_s%>
|
||||
<span>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'#',
|
||||
{:focus => 'project_respond',
|
||||
:onclick => "toggleAndSettingWordsVal($('##{id}'),
|
||||
$('##{id} textarea'),
|
||||
'#{l(:label_reply_plural)} #{journal.user.show_name}: ');
|
||||
return false;"} %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= id %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<% else %>
|
||||
<p class="font_description">
|
||||
<!--teacher could create the course directly-->
|
||||
<%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %>
|
||||
<%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
|
||||
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
||||
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %></span><%= show_user_content event %>
|
||||
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= time_tag_welcome event.event_datetime %></span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
||||
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||
<li id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
<span class="portrait">
|
||||
|
@ -12,10 +13,12 @@
|
|||
<p>
|
||||
<span class="time"><%= format_time reply.created_on %></span>
|
||||
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.show_name}: '); return false;"}
|
||||
%>
|
||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||
<% end %>
|
||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
|
@ -23,7 +26,9 @@
|
|||
</p>
|
||||
</div>
|
||||
<div id='<%=id%>' class="respond-form">
|
||||
<% if reply_allow %>
|
||||
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</li>
|
|
@ -35,6 +35,7 @@ function checkMaxLength() {
|
|||
}
|
||||
|
||||
</script>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% if jour.size >0 %>
|
||||
<% remove_allowed = (User.current.id == jour.first.user_id) %>
|
||||
<ul class="message-for-user">
|
||||
|
@ -49,10 +50,11 @@ function checkMaxLength() {
|
|||
<span class="font_lighter"> <%= l :label_comment_time %>: <%= format_time journal.created_on %></span>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;"}
|
||||
%>
|
||||
|
||||
<% end %>
|
||||
<% if @user == User.current || User.current.admin? || journal.user.id == User.current.id %>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
|
@ -61,7 +63,9 @@ function checkMaxLength() {
|
|||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<% if reply_allow %>
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
|
|
|
@ -3,19 +3,17 @@
|
|||
.text_center{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif;
|
||||
}
|
||||
|
||||
|
||||
/* 按钮
|
||||
*******************************************************************************/
|
||||
input[class='whiteButton'], .whiteButton {
|
||||
|
||||
input[class~='whiteButton'], .whiteButton {
|
||||
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
|
||||
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
|
||||
box-shadow:inset 0px 1px 0px 0px #ffffff;
|
||||
|
||||
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
|
||||
background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
|
||||
background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
|
||||
|
@ -23,28 +21,24 @@ input[class='whiteButton'], .whiteButton {
|
|||
background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
|
||||
background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0);
|
||||
|
||||
background-color:#ffffff;
|
||||
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
border-radius:6px;
|
||||
|
||||
border:1px solid #dcdcdc;
|
||||
|
||||
display:inline-block;
|
||||
color:#666666;
|
||||
color: #116699;
|
||||
font-family:arial;
|
||||
font-size:15px;
|
||||
font-weight:bold;
|
||||
padding:6px 24px;
|
||||
/*padding:3px 10px;*/
|
||||
text-decoration:none;
|
||||
|
||||
text-shadow:0px 1px 0px #ffffff;
|
||||
|
||||
}
|
||||
input[class='whiteButton']:hover, .whiteButton:hover {
|
||||
|
||||
input[class~='whiteButton']:hover, .whiteButton:hover {
|
||||
color: #c61a1a;
|
||||
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
|
||||
background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
|
||||
background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
|
||||
|
@ -52,14 +46,22 @@ input[class='whiteButton']:hover, .whiteButton:hover {
|
|||
background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
|
||||
background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0);
|
||||
|
||||
text-decoration: none;
|
||||
background-color:#f6f6f6;
|
||||
}
|
||||
|
||||
|
||||
input[class='whiteButton']:active, .whiteButton:active {
|
||||
input[class~='whiteButton']:active, .whiteButton:active {
|
||||
position:relative;
|
||||
top:1px;
|
||||
text-decoration: none;
|
||||
}
|
||||
input[class~='m3p10'], .m3p10 {
|
||||
margin: 0;
|
||||
padding: 3px 10px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
}
|
||||
input[class~='h30'], .h30{
|
||||
height: 30px;
|
||||
}
|
||||
/* minimal
|
||||
*******************************************************************************/
|
||||
|
@ -313,3 +315,25 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
|||
border-bottom-left-radius : 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
/* 项目新闻栏
|
||||
*******************************************************************************/
|
||||
.add_frame {
|
||||
position:relative;
|
||||
margin: 5px 10px 2px 0px;
|
||||
padding: 10px 10px;
|
||||
border-radius: 5px;
|
||||
/*box-shadow: 1px 1px 6px rgb(241,241,241);*/
|
||||
/*border: 1px solid #F1F1F1;*/
|
||||
}
|
||||
.add_frame_header{
|
||||
background: linear-gradient(#fbfbfb, #f8f8f8) repeat scroll 0% 0% transparent;
|
||||
border-bottom: 1px solid rgb(226,226,226);
|
||||
box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245,245,245);
|
||||
height: 39px;
|
||||
font-size: 15px;
|
||||
|
||||
line-height: 26px;
|
||||
height: 30px;
|
||||
font-size: 1.5em;
|
||||
padding-left: 4%;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue