memcached_alan
sw 10 years ago
commit 6edbb3c7ed

@ -2,6 +2,7 @@
module Mobile module Mobile
module Apis module Apis
class Comments < Grape::API class Comments < Grape::API
include ApplicationHelper
resource :comments do resource :comments do
desc '课程通知评论' desc '课程通知评论'
params do params do
@ -82,8 +83,8 @@ module Mobile
memo: {:subject => params[:subject],:content => '该贴来自手机App意见反馈'}, memo: {:subject => params[:subject],:content => '该贴来自手机App意见反馈'},
} }
cs = CommentService.new cs = CommentService.new
memo = cs.create_feedback cs_params, current_user memo,message = cs.create_feedback cs_params, current_user
raise "commit failed #{memo.errors.full_messages}" if memo.new_record? raise message if memo.new_record?
present :status, 0 present :status, 0
end end

@ -82,7 +82,7 @@ module Mobile
desc "用户搜索" desc "用户搜索"
params do params do
requires :name, type: String, desc: '用户名关键字' requires :name, type: String, desc: '用户名关键字'
requires :search_by, type: String,desc: '搜索依据0 昵称1 用户名2 邮箱' requires :search_by, type: String,desc: '搜索依据0 昵称1 用户名2 邮箱,3 昵称和姓名'
end end
get 'search/search_user' do get 'search/search_user' do
us = UsersService.new us = UsersService.new

@ -15,6 +15,8 @@ module Mobile
course_dynamic_expose :type course_dynamic_expose :type
course_dynamic_expose :count course_dynamic_expose :count
course_dynamic_expose :course_name course_dynamic_expose :course_name
course_dynamic_expose :course_term
course_dynamic_expose :course_time
course_dynamic_expose :course_id course_dynamic_expose :course_id
course_dynamic_expose :course_img_url course_dynamic_expose :course_img_url
course_dynamic_expose :message course_dynamic_expose :message

@ -1,5 +1,6 @@
class DiscussDemosController < ApplicationController class DiscussDemosController < ApplicationController
def index def index
@discuss_demo_list = DiscussDemo.where("body is not null").order("created_at desc").page(params[:page] || 1).per(10) @discuss_demo_list = DiscussDemo.where("body is not null").order("created_at desc").page(params[:page] || 1).per(10)
end end
@ -24,7 +25,12 @@ class DiscussDemosController < ApplicationController
end end
def destroy def destroy
DiscussDemo.delete_all(["id = ?",params[:id]]) asset = Kindeditor::Asset.find_by_owner_id(params[:id])
filepath = File.join(Rails.root,"public","files","uploads",
asset[:created_at].to_s.gsub("+0800","").to_datetime.strftime("%Y%m").to_s,
asset[:asset].to_s)
File.delete(filepath) if File.exist?filepath
DiscussDemo.destroy(params[:id])
redirect_to :controller=> 'discuss_demos',:action => 'index' redirect_to :controller=> 'discuss_demos',:action => 'index'
end end

@ -91,6 +91,7 @@ class DocumentsController < ApplicationController
def update def update
@document.safe_attributes = params[:document] @document.safe_attributes = params[:document]
@document.save_attachments(params[:attachments])
if request.put? and @document.save if request.put? and @document.save
flash[:notice] = l(:notice_successful_update) flash[:notice] = l(:notice_successful_update)
redirect_to document_url(@document) redirect_to document_url(@document)

@ -20,7 +20,7 @@ class ForumsController < ApplicationController
#@memo.author_id = User.current.id #@memo.author_id = User.current.id
#@forum = @memo.forum #@forum = @memo.forum
cs = CommentService.new cs = CommentService.new
@memo = cs.create_feedback params,User.current @memo,message = cs.create_feedback params,User.current
respond_to do |format| respond_to do |format|
if !@memo.new_record? if !@memo.new_record?
format.html { redirect_to forum_path(@memo.forum) } format.html { redirect_to forum_path(@memo.forum) }

@ -109,7 +109,7 @@ class MembersController < ApplicationController
end end
if params[:flag] if params[:flag]
unless members.present? && members.all? {|m| m.valid? } unless members.present? && members.all? {|m| m.valid? }
flash[:error] = members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') flash[:error] = members.empty? ? l(:label_user_role_null) :members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')
else else
flash[:notice] = l(:label_invite_success) flash[:notice] = l(:label_invite_success)
end end

@ -340,6 +340,7 @@ class ProjectsController < ApplicationController
@is_zhuce =false @is_zhuce =false
flash[:notice] = l(:notice_email_sent, :value => email) flash[:notice] = l(:notice_email_sent, :value => email)
else else
flash[:error] = l(:notice_registed_success, :value => email)
@is_zhuce = true @is_zhuce = true
end end
respond_to do |format| respond_to do |format|

@ -20,7 +20,7 @@ class WelcomeController < ApplicationController
include WelcomeHelper include WelcomeHelper
helper :project_score helper :project_score
caches_action :robots caches_action :robots
before_filter :find_first_page, :only => [:index] #before_filter :find_first_page, :only => [:index]
# before_filter :fake, :only => [:index, :course] # before_filter :fake, :only => [:index, :course]
before_filter :entry_select, :only => [:index] before_filter :entry_select, :only => [:index]

@ -60,4 +60,8 @@ module ApiHelper
end end
[count,is_teacher] [count,is_teacher]
end end
def get_user_language user
(user.language.nil? || user.language == "") ? 'zh':user.language
end
end end

@ -43,7 +43,7 @@ module WatchersHelper
) )
method = watched ? 'delete' : 'post' method = watched ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method, :class => css link_to text, url, :remote => true, :method => method, :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 21px;padding-top:1px; background: none repeat scroll 0% 0% #64BDD9; TES"
end end
############## added by linchun ############## added by linchun
@ -278,11 +278,11 @@ module WatchersHelper
) )
method = applied ? 'delete' : 'post' method = applied ? 'delete' : 'post'
link_to text, url, :remote => true, :method => method ,:class=>css link_to text, url, :remote => true, :method => method ,:style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 21px; line-height: 22px;padding-top:1px; background: none repeat scroll 0% 0% #64BDD9; TES"
end end
def exit_project_link(project) def exit_project_link(project)
link_to(l(:label_exit_project),exit_cur_project_path(project.id), link_to(l(:label_exit_project),exit_cur_project_path(project.id),
:remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" ) :remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 21px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES;padding-top:1px;" )
end end
end end

@ -1,4 +1,4 @@
class DiscussDemo < ActiveRecord::Base class DiscussDemo < ActiveRecord::Base
attr_accessible :title, :body attr_accessible :title, :body
has_many_kindeditor_assets :attachments, :dependent => :destroy has_many_kindeditor_assets :assets, :dependent => :destroy
end end

@ -214,6 +214,8 @@ class User < Principal
where(" LOWER(login) LIKE '#{pattern}' ") where(" LOWER(login) LIKE '#{pattern}' ")
elsif type == "1" elsif type == "1"
where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ") where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ")
elsif type == "3"
where(" LOWER(concat(lastname, firstname,login)) LIKE '#{pattern}' ")
else else
where(" LOWER(mail) LIKE '#{pattern}' ") where(" LOWER(mail) LIKE '#{pattern}' ")
end end

@ -33,39 +33,41 @@ class UserExtensions < ActiveRecord::Base
return self.brief_introduction return self.brief_introduction
end end
# added by meng # added by meng
def show_identity def show_identity
if self.identity == 0 if User.current.language == 'zh'||User.current.language == ''
if User.current.language == 'zh' case self.identity
user_identity = '教师' when 0
else user_identity = l(:label_account_identity_teacher)
user_identity = 'Teacher' when 1
end user_identity = l(:label_account_identity_student)
elsif self.identity == 1 when 2
if User.current.language == 'zh' user_identity = l(:label_account_identity_enterprise)
user_identity = '学生' when 3
else user_identity = l(:label_account_identity_developer)
user_identity = 'Student'
end
elsif self.identity == 2
if User.current.language == 'zh'
user_identity = '企业'
else else
user_identity = 'Enterprise' user_identity = ''
end end
elsif self.identity == 3
if User.current.language == 'zh'
user_identity = '开发者'
else else
user_identity = 'Developer' case self.identity
end when 0
user_identity = l(:label_account_identity_teacher)
when 1
user_identity = l(:label_account_identity_student)
when 2
user_identity = l(:label_account_identity_enterprise)
when 3
user_identity = l(:label_account_identity_developer)
else else
user_identity = '' user_identity = ''
end end
end
return user_identity return user_identity
end end
# end # end
def self.introduction(user, message) def self.introduction(user, message)
unless user.user_extensions.nil? unless user.user_extensions.nil?
info = user.user_extensions info = user.user_extensions

@ -1,4 +1,6 @@
class CommentService class CommentService
include ApiHelper
include Redmine::I18n
#评论 #评论
def news_comments params,current_user def news_comments params,current_user
@news = News.find(params[:id]) @news = News.find(params[:id])
@ -84,7 +86,8 @@ class CommentService
@memo.forum_id = "1" @memo.forum_id = "1"
@memo.author_id = current_user.id @memo.author_id = current_user.id
@memo.save @memo.save
@memo message = "#{l(:label_commit_failed,:locale => get_user_language(current_user))}: #{@memo.errors.full_messages}" if @memo.new_record?
[@memo,message]
end end
#课程留言列表 #课程留言列表

@ -38,7 +38,7 @@ class CoursesService
if name.blank? if name.blank?
raise 'sumbit empty' raise 'sumbit empty'
end end
@courses = courses_all.visible @courses = courses_all.visible(current_user)
if params[:name].present? if params[:name].present?
@courses_all = @courses.like(params[:name]) @courses_all = @courses.like(params[:name])
else else
@ -346,7 +346,7 @@ class CoursesService
membership = @user.coursememberships.all(:conditions => Course.visible_condition(current_user)) membership = @user.coursememberships.all(:conditions => Course.visible_condition(current_user))
end end
if membership.nil? || membership.count == 0 if membership.nil? || membership.count == 0
raise l(:label_no_courses,:locale => current_user.language.nil? ? 'zh':current_user.language) raise l(:label_no_courses,:locale => get_user_language(current_user))
end end
membership.sort! {|older, newer| newer.created_on <=> older.created_on } membership.sort! {|older, newer| newer.created_on <=> older.created_on }
result = [] result = []
@ -355,19 +355,19 @@ class CoursesService
latest_course_dynamics = [] latest_course_dynamics = []
latest_news = course.news.order("created_on desc").first latest_news = course.news.order("created_on desc").first
unless latest_news.nil? unless latest_news.nil?
latest_course_dynamics << {:type => 1,:time => latest_news.created_on,:message => l(:label_recently_updated_notification,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 1,:time => latest_news.created_on,:message => l(:label_recently_updated_notification,:locale => get_user_language(current_user))}
end end
latest_message = course.journals_for_messages.order("created_on desc").first latest_message = course.journals_for_messages.order("created_on desc").first
unless latest_message.nil? unless latest_message.nil?
latest_course_dynamics << {:type => 2,:time => latest_message.created_on,:message => l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 2,:time => latest_message.created_on,:message => l(:label_recently_updated_message,:locale => get_user_language(current_user))}
end end
latest_attachment = course.attachments.order("created_on desc").first latest_attachment = course.attachments.order("created_on desc").first
unless latest_attachment.nil? unless latest_attachment.nil?
latest_course_dynamics << {:type => 3,:time => latest_attachment.created_on,:message => l(:label_recently_updated_courseware,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 3,:time => latest_attachment.created_on,:message => l(:label_recently_updated_courseware,:locale => get_user_language(current_user))}
end end
latest_bid = course.homeworks.order('updated_on DESC').first latest_bid = course.homeworks.order('updated_on DESC').first
unless latest_bid.nil? unless latest_bid.nil?
latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 4,:time => latest_bid.updated_on,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))}
end end
#每个作业中的最新留言 #每个作业中的最新留言
messages = [] messages = []
@ -382,7 +382,7 @@ class CoursesService
end end
latest_bid_message = messages.first latest_bid_message = messages.first
unless latest_bid_message.nil? unless latest_bid_message.nil?
latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => l(:label_recently_updated_message,:locale => get_user_language(current_user))}
end end
#每个作业中学生最后提交的作业 #每个作业中学生最后提交的作业
homeworks = [] homeworks = []
@ -397,12 +397,12 @@ class CoursesService
end end
latest_homework_attach = homeworks.first latest_homework_attach = homeworks.first
unless latest_homework_attach.nil? unless latest_homework_attach.nil?
latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => l(:label_recently_updated_homework,:locale => current_user.language.nil? ? 'zh':current_user.language)} latest_course_dynamics << {:type => 4,:time => latest_homework_attach.updated_at,:message => l(:label_recently_updated_homework,:locale => get_user_language(current_user))}
end end
latest_course_dynamics.sort!{|order,newer| newer[:time] <=> order[:time]} latest_course_dynamics.sort!{|order,newer| newer[:time] <=> order[:time]}
latest_course_dynamic = latest_course_dynamics.first latest_course_dynamic = latest_course_dynamics.first
unless latest_course_dynamic.nil? unless latest_course_dynamic.nil?
result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil} result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:course_time => course.time,:course_term => course.term,:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil}
end end
end end
result.sort!{|order,newer| newer[:update_time] <=> order[:update_time]} result.sort!{|order,newer| newer[:update_time] <=> order[:update_time]}

@ -193,7 +193,6 @@ class UsersService
@current_user.save @current_user.save
#raise @current_user.errors.full_message #raise @current_user.errors.full_message
#return @current_user #return @current_user
else else
raise 'wrong password' raise 'wrong password'
end end

@ -49,7 +49,7 @@
<span class="add_attachment" style="font-weight:normal;"> <span class="add_attachment" style="font-weight:normal;">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%--> <!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %> <%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
<%= file_field_tag 'attachments[dummy][file]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',
:class => 'file_selector', :class => 'file_selector',

@ -38,7 +38,7 @@
<span class="add_attachment"> <span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%--> <!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> <%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()" %>
<%= file_field_tag 'attachments[dummy][file]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',
:class => 'file_selector', :class => 'file_selector',

@ -1,7 +1,7 @@
$('#attachments_<%= j params[:attachment_id] %>').remove(); $('#attachments_<%= j params[:attachment_id] %>').remove();
var count=$('#attachments_fields>span').length; var count=$('#attachments_fields>span').length;
if(count<=0){ if(count<=0){
$("#upload_file_count").text("未上传文件"); $("#upload_file_count").text(<%= l(:label_no_file_uploaded)%>);
$(".remove_all").remove(); $(".remove_all").remove();
}else{ }else{
$("#upload_file_count").html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件"); $("#upload_file_count").html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件");

@ -24,10 +24,6 @@
</div> </div>
<!--display the board--> <!--display the board-->
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<% if !User.current.logged? %> <% if !User.current.logged? %>
<div style="font-size: 14px;margin:20px;"> <div style="font-size: 14px;margin:20px;">
<% if @project.project_type == 1 %> <% if @project.project_type == 1 %>
@ -39,62 +35,52 @@
<hr/> <hr/>
</div> </div>
<% end %> <% end %>
<div class="borad-setitle">
<span class="borad-topic-count"> <!-- 内容显示部分 -->
共有 <div class="project_right">
<%= link_to @topic_count,:controller => 'boards',:action => 'index' %> <div class="project_r_h">
个贴子 <h2 class="project_h2"><%= h @board.name %></h2>
</span> </div>
<div class="talk_top">
<div class="fl">项目讨论区共有<span><%= @topic_count %></span>个帖子 </div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span> <span><%= link_to l(:label_message_new), new_board_message_path(@board),
<%= link_to l(:label_message_new), :class => 'problem_new_btn fl',
new_board_message_path(@board), :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
</span>
<% end %> <% end %>
<div class="cl"></div>
</div> </div>
<div style="width: 100%;word-break: break-all;word-wrap: break-word;"> <!-- 帖子内容显示 -->
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<table class="content-text-list"> <div class="problem_main">
<tr> <a>
<td colspan="2" valign="top" width="50"> <%= link_to image_tag(url_to_avatar(topic.author), :class => "problem_pic talk_pic fl"), user_path(topic.author) %>
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %> </a>
</td> <div class="talk_txt fl">
<td> <div>
<table width="640px" border="0"> <span><%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %></span>
<tr> <% if topic.sticky? %>
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <span class="talk_up">置顶</span>
<%= topic.locked? ? 'locked' : '' %>">
<%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
</td>
<td align="right" rowspan="3">
<table class="borad-count">
<tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), board_message_path(@board, topic) %></td>
</tr>
<tr>
<td align="center">回答</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" colspan="2">
<span class="font_lighter"><%= authoring topic.created_on, topic.author %><br/></span></td>
</tr>
</table>
</td>
</tr>
</table>
<% end %> <% end %>
<div class="pagination">
<%= pagination_links_full @topic_pages, @topic_count %>
</div> </div>
<div class="problem_line">
<span>由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %></span>
<span>添加于<%= format_time topic.created_on %></span>
</div>
</div>
<span class="talk_btn fr">回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %></span>
<div class="cl"></div>
</div><!--讨论主类容 end-->
<% end %>
<ul class="wlist">
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
</ul>
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
<!--讨论主类容 end-->
<div class="cl"></div>
</div> </div>
<% other_formats_links do |f| %> <% other_formats_links do |f| %>

@ -11,8 +11,8 @@
<%= wikitoolbar_for 'document_description' %> <%= wikitoolbar_for 'document_description' %>
<% if @document.new_record? %>
<div class="box tabular"> <div class="box tabular">
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', :locals => {:container => @document} %></p> <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', :locals => {:container => @document} %></p>
</div> </div>
<% end %>

@ -1,4 +1,6 @@
<h3><%=l(:label_document)%></h3> <div class="project_r_h">
<h2 class="project_h2"><%=l(:label_document_plural)%></h2>
</div>
<%= labelled_form_for @document do |f| %> <%= labelled_form_for @document do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %> <%= render :partial => 'form', :locals => {:f => f} %>

@ -8,10 +8,10 @@
<table> <table>
<tr> <tr>
<% if versions.any? %> <% if versions.any? %>
<td><p><%= l(:field_version) %></p></td> <td><p style="padding-left: 50px;"><%= l(:field_version) %></p></td>
<td> <td>
<%= select_tag "version_id", content_tag('option', '') + <%= select_tag "version_id", content_tag('option', '') +
options_from_collection_for_select(versions, "id", "name"), {style: 'width:100px'} %> options_from_collection_for_select(versions, "id", "name"), {style: 'width:230px'} %>
</td> </td>
<% if attachmenttypes.any? %> <% if attachmenttypes.any? %>
<td><%= l(:attachment_type) %></label></td> <td><%= l(:attachment_type) %></label></td>
@ -31,14 +31,10 @@
<% end %> <% end %>
</p> </p>
<% end %> <% end %>
</tr> </tr>
</table> </table>
<p style="padding-left: 54px;"> <%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</p> </p>
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</div> </div>
<%= submit_tag l(:button_add) %> <%= submit_tag l(:button_add) %>
<% end %> <% end %>

@ -1,7 +1,7 @@
<% attachmenttypes = @project.attachmenttypes %> <% attachmenttypes = @project.attachmenttypes %>
<% sufixtypes = @project.contenttypes %> <% sufixtypes = @project.contenttypes %>
<div class="project_r_h"> <div class="project_r_h">
<h2 class="project_h2">资源共享区</h2> <h2 class="project_h2"><%= l(:lable_file_sharingarea) %></h2>
</div> </div>
<div class="content-title-top"> <div class="content-title-top">
@ -16,12 +16,12 @@
</div> </div>
<div id="relation_file_div" class="relation_file_div hidden"> <div id="relation_file_div" class="relation_file_div hidden">
<fieldset> <fieldset>
<legend>搜索</legend> <legend><%= l(:label_search)%></legend>
<%= form_tag( <%= form_tag(
attachments_autocomplete_path(:format => 'js'), attachments_autocomplete_path(:format => 'js'),
:remote => true, :remote => true,
:method => :post) do %> :method => :post) do %>
<%= label_tag(:attach_search, "按关键字搜索:") %> <%= label_tag(:attach_search, l(:label_search_by_keyword)) %>
<%= text_field_tag(:attach_search) %> <%= text_field_tag(:attach_search) %>
<%#= submit_tag("Search") %> <%#= submit_tag("Search") %>
<% end -%> <% end -%>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save