Skip to content

Commit

Permalink
Merge branch 'development' into fromthepage.com
Browse files Browse the repository at this point in the history
  • Loading branch information
saracarl committed Dec 9, 2019
2 parents e996f94 + 70b4c78 commit cdeb43a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/models/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def search_works(search)
end

def self.search(search)
where("title LIKE ? OR slug LIKE ?", "%#{search}%", "%#{search}%")
sql = "title like ? OR slug LIKE ? OR owner_user_id in (select id from \
users where owner=1 and display_name like ?)"
where(sql, "%#{search}%", "%#{search}%", "%#{search}%")
end

def sections
Expand Down
4 changes: 3 additions & 1 deletion app/models/document_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def search_collection_works(search)
end

def self.search(search)
where("title LIKE ? OR slug LIKE ?", "%#{search}%", "%#{search}%")
sql = "title like ? OR slug LIKE ? OR owner_user_id in (select id from \
users where owner=1 and display_name like ?)"
where(sql, "%#{search}%", "%#{search}%", "%#{search}%")
end

def default_orientation
Expand Down
13 changes: 13 additions & 0 deletions app/views/dashboard/landing_page.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@

.columns.project-list
article.maincol
-if @search_results && @owners.empty?
-@search_results.each do |sr|
.project-list_projects
.projects-owner
h3.projects-owner_title
=link_to sr.owner.display_name, user_profile_path(sr.owner)
.projects
div.projects_details
.projects_collection
h5
=link_to sr.title, collection_path(sr.owner.slug, sr.id)
.projects_collection_snippet
= truncate(strip_tags(sr.intro_block), length: 300, separator: ' ') || ''
-@owners.each do |owner|
-if params[:search]
-projects = @search_results.select{ |p| p.owner_user_id == owner.id}
Expand Down
4 changes: 4 additions & 0 deletions app/views/transcribe/display_page.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ h2.legend Page Notes
function transcribe_periodic_timer() {
$.ajax({
url: "#{collection_transcribe_still_editing_path(current_user.slug, @collection.id, @work.id, @page.id)}",
complete: function () {
$(".page-busy-overlay").hide();
}
});
}
Expand Down

0 comments on commit cdeb43a

Please sign in to comment.