|
|
|
@ -43,7 +43,7 @@ class FilesController < ApplicationController
|
|
|
|
|
@attachments = @attachments.by_keywords(params[:search])
|
|
|
|
|
|
|
|
|
|
if params[:no_link]
|
|
|
|
|
@attachments = @attachments.where(link: nil)
|
|
|
|
|
@attachments = @attachments.no_link
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@attachments = @attachments.page(@page).per(@page_size)
|
|
|
|
@ -142,7 +142,7 @@ class FilesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def public_with_course_and_project
|
|
|
|
|
@attachments = Attachment.publiced.simple_columns
|
|
|
|
|
@attachments = Attachment.publiced.no_link.simple_columns
|
|
|
|
|
.contains_course_and_project
|
|
|
|
|
.includes(:container, author: :user_extension)
|
|
|
|
|
.by_filename_or_user_name(params[:search])
|
|
|
|
@ -155,7 +155,7 @@ class FilesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
def mine_with_course_and_project
|
|
|
|
|
@current_user = current_user
|
|
|
|
|
@attachments = Attachment.mine(current_user)
|
|
|
|
|
@attachments = Attachment.mine(current_user).no_link
|
|
|
|
|
.simple_columns
|
|
|
|
|
.contains_course_and_project
|
|
|
|
|
.by_keywords(params[:search])
|
|
|
|
|