Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
0d5bad1ddd
|
@ -44,7 +44,7 @@ class Principal < ActiveRecord::Base
|
|||
else
|
||||
pattern = "%#{q}%".gsub("/","//").gsub("_","/_")
|
||||
# sql = %w(login firstname lastname mail).map {|column| "LOWER(#{table_name}.#{column}) LIKE LOWER(:p)"}.join(" OR ")
|
||||
sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) or LOWER(login) LIKE LOWER(:p) or LOWER(mail) LIKE LOWER(:p) escape '/'"
|
||||
sql= "LOWER(concat(lastname,firstname)) LIKE LOWER(:p) escape '/' or LOWER(login) LIKE LOWER(:p) escape '/' or LOWER(mail) LIKE LOWER(:p) escape '/'"
|
||||
params = {:p => pattern}
|
||||
if q =~ /^(.+)\s+(.+)$/
|
||||
a, b = "#{$1}%", "#{$2}%"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% teacher_num = 0 %>
|
||||
<% student_num = 0 %>
|
||||
<% teacher_num = TeacherAndAssistantCount(@course) %>
|
||||
<% student_num = studentCount(@course) %>
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<% if is_excellent_course(@course) %>
|
||||
<img src="/images/course/boutique.png" width="50" height="auto" alt="精品" class="boutiqueP" />
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="resources" nhname="new_topic_form" >
|
||||
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
|
||||
<div>
|
||||
<input class="postDetailInput fl mr15" style="margin-bottom:15px;" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题"></input>
|
||||
<input class="postDetailInput fl mr15" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题"></input>
|
||||
</div>
|
||||
<div id="doc_title_hint">
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
TO <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %>
|
||||
|
|
||||
<span style="color:#269ac9;"><%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %></span>
|
||||
<% if @organization.home_id == document.id %>
|
||||
<% if document.organization.home_id == document.id %>
|
||||
<span class="red_homework_btn_cir ml5">已设为首页</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue