Merge pull request #2047 from bjrambo/pr/file-query

파일목록에서 각각 정렬기능 및 검색기능 추가.
This commit is contained in:
Johnny 2022-12-18 01:34:21 +09:00 committed by GitHub
commit 7f51e823cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 44 additions and 7 deletions

View file

@ -81,6 +81,7 @@ class fileAdminModel extends file
// Set variables
$args->sort_index = $obj->sort_index ?? null;
$args->order_type = $obj->order_type ?? 'desc';
$args->page = isset($obj->page) ? ($obj->page ? $obj->page : 1) : 1;
$args->list_count = isset($obj->list_count) ? ($obj->list_count? $obj->list_count : 20) : 20;
$args->page_count = isset($obj->page_count) ? ($obj->page_count? $obj->page_count : 10) : 10;
@ -203,6 +204,9 @@ class fileAdminModel extends file
case 'download_count' :
$args->s_download_count = (int)$search_keyword;
break;
case 'download_count_less' :
$args->s_download_count_less = (int)$search_keyword;
break;
case 'regdate' :
$args->s_regdate = $search_keyword;
break;

View file

@ -27,7 +27,8 @@ class fileAdminView extends file
$args->list_count = 30; // /< Number of documents that appear on a single page
$args->page_count = 10; // /< Number of pages that appear in the page navigation
$args->sort_index = 'file_srl'; // /< Sorting values
$args->sort_index = Context::get('sort_index') ?? 'file_srl'; // /< Sorting values
$args->order_type = Context::get('order_type') ?? null;
$args->isvalid = Context::get('isvalid');
$args->module_srl = Context::get('module_srl');
// Get a list

View file

@ -62,6 +62,7 @@ $lang->file_search_target_list['filesize_mega_more'] = 'File Size(mbyte, more)';
$lang->file_search_target_list['filesize_less'] = 'File Size(byte, less)';
$lang->file_search_target_list['filesize_mega_less'] = 'File Size(Mb, less)';
$lang->file_search_target_list['download_count'] = 'Downloads(more)';
$lang->file_search_target_list['download_count_less'] = 'Downloads(less)';
$lang->file_search_target_list['user_id'] = 'User UD';
$lang->file_search_target_list['user_name'] = 'User Name';
$lang->file_search_target_list['nick_name'] = 'Nickname';

View file

@ -29,6 +29,7 @@ $lang->file_search_target_list['filename'] = 'Nombre del archivo';
$lang->file_search_target_list['filesize_more'] = 'Tamaño del archivo(Byte, sobre)';
$lang->file_search_target_list['filesize_mega_more'] = 'Tamaño del archivo(Mb, o mb)';
$lang->file_search_target_list['download_count'] = 'Descargados(Sobre)';
$lang->file_search_target_list['download_count_less'] = 'Descargados(less)';
$lang->file_search_target_list['user_id'] = 'ID';
$lang->file_search_target_list['user_name'] = 'Nombre';
$lang->file_search_target_list['nick_name'] = 'Apodo';

View file

@ -24,6 +24,7 @@ $lang->msg_exceeds_limit_size = 'La mesure de l\'(des) Annexe(s) est plus grande
$lang->file_search_target_list['filename'] = 'Nom de Fichier';
$lang->file_search_target_list['filesize_more'] = 'Mesure de Fichier(octet, surplus)';
$lang->file_search_target_list['download_count'] = 'Telecharges(surplus)';
$lang->file_search_target_list['download_count_less'] = 'Telecharges(less)';
$lang->file_search_target_list['regdate'] = 'Enrgistre';
$lang->file_search_target_list['ipaddress'] = 'Adresse IP';
$lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.';

View file

@ -37,6 +37,7 @@ $lang->file_search_target_list['filesize_mega_more'] = 'ファイルサイズ(Mb
$lang->file_search_target_list['filesize_less'] = 'ファイルサイズ(byte, 以下)';
$lang->file_search_target_list['filesize_mega_less'] = 'ファイルサイズ(Mb, 以下)';
$lang->file_search_target_list['download_count'] = 'ダウンロード数(以上)';
$lang->file_search_target_list['download_count_less'] = 'ダウンロード数(以下)';
$lang->file_search_target_list['user_id'] = 'ユーザーID';
$lang->file_search_target_list['user_name'] = '名前';
$lang->file_search_target_list['nick_name'] = 'ニックネーム';

View file

@ -63,6 +63,7 @@ $lang->file_search_target_list['filesize_mega_more'] = '파일 크기(MB, 이상
$lang->file_search_target_list['filesize_less'] = '파일 크기(byte, 이하)';
$lang->file_search_target_list['filesize_mega_less'] = '파일 크기(MB, 이하)';
$lang->file_search_target_list['download_count'] = '다운로드 횟수(이상)';
$lang->file_search_target_list['download_count_less'] = '다운로드 횟수(이하)';
$lang->file_search_target_list['user_id'] = '아이디';
$lang->file_search_target_list['user_name'] = '이름';
$lang->file_search_target_list['nick_name'] = '닉네임';

View file

@ -30,6 +30,7 @@ $lang->file_search_target_list['filesize_mega_more'] = 'Размер файла(
$lang->file_search_target_list['filesize_less'] = 'Размер файла(Байт, ниже)';
$lang->file_search_target_list['filesize_mega_less'] = 'Размер файла(Мегабайт, ниже)';
$lang->file_search_target_list['download_count'] = 'Скачано(свыше)';
$lang->file_search_target_list['download_count_less'] = 'Скачано(ниже)';
$lang->file_search_target_list['user_id'] = 'ID';
$lang->file_search_target_list['user_name'] = 'Имя';
$lang->file_search_target_list['nick_name'] = 'Ник';

View file

@ -34,6 +34,7 @@ $lang->file_search_target_list['filesize_mega_more'] = 'Dosya Boyutu(mbyte, üst
$lang->file_search_target_list['filesize_less'] = 'Dosya Boyutu(byte, düşük)';
$lang->file_search_target_list['filesize_mega_less'] = 'Dosya Boyutu(Mb, düşük)';
$lang->file_search_target_list['download_count'] = 'İndirmeler(daha fazla)';
$lang->file_search_target_list['download_count_less'] = 'İndirmeler(düşük)';
$lang->file_search_target_list['user_id'] = 'Kullanıcı Kimliği';
$lang->file_search_target_list['user_name'] = 'Kullanıcı İsmi';
$lang->file_search_target_list['nick_name'] = 'Rumuz';

View file

@ -33,6 +33,7 @@ $lang->file_search_target_list['filesize_mega_more'] = 'Dung lượng(Tối thi
$lang->file_search_target_list['filesize_less'] = 'Dung lượng(Tối đa Byte)';
$lang->file_search_target_list['filesize_mega_less'] = 'Dung lượng(Tối đa MB)';
$lang->file_search_target_list['download_count'] = 'Lượt Download';
$lang->file_search_target_list['download_count_less'] = 'Lượt Download(Tối đa Lượt)';
$lang->file_search_target_list['user_id'] = 'ID đăng nhập';
$lang->file_search_target_list['user_name'] = 'Tên Sử dụng';
$lang->file_search_target_list['regdate'] = 'Ngày gửi';

View file

@ -32,6 +32,7 @@ $lang->file_search_target_list['filesize_mega_more'] = '文件大小(Mb, 以上)
$lang->file_search_target_list['filesize_less'] = '文件大小(byte, 以下)';
$lang->file_search_target_list['filesize_mega_less'] = '文件大小(Mb, 以下)';
$lang->file_search_target_list['download_count'] = '下载次数(以上)';
$lang->file_search_target_list['download_count_less'] = '下载次数(以下)';
$lang->file_search_target_list['user_id'] = '用户名';
$lang->file_search_target_list['user_name'] = '姓名';
$lang->file_search_target_list['nick_name'] = '昵称';

View file

@ -34,6 +34,7 @@ $lang->file_search_target_list['filesize_mega_more'] = '檔案大小(Mb, 以上)
$lang->file_search_target_list['filesize_less'] = '檔案大小(byte, 以下)';
$lang->file_search_target_list['filesize_mega_less'] = '檔案大小(Mb, 以下)';
$lang->file_search_target_list['download_count'] = '下載次數(以上)';
$lang->file_search_target_list['download_count_less'] = '下載次數(以下)';
$lang->file_search_target_list['user_id'] = '帳號';
$lang->file_search_target_list['user_name'] = '姓名';
$lang->file_search_target_list['nick_name'] = '暱稱';

View file

@ -23,7 +23,8 @@
<condition operation="search" column="files.source_filename" var="s_filename" pipe="or" />
<condition operation="more" column="files.file_size" var="s_filesize_more" pipe="or" />
<condition operation="less" column="files.file_size" var="s_filesize_less" pipe="or" />
<condition operation="more" column="files.download_count" var="s_download_count" pipe="or" />
<condition operation="more" column="files.download_count" var="s_download_count" pipe="or" />
<condition operation="less" column="files.download_count" var="s_download_count_less" pipe="or" />
<condition operation="like_prefix" column="files.regdate" var="s_regdate" pipe="or" />
<condition operation="like_prefix" column="files.ipaddress" var="s_ipaddress" pipe="or" />
<condition operation="search" column="member.user_id" var="s_user_id" pipe="or" />
@ -32,7 +33,7 @@
</group>
</conditions>
<navigation>
<index var="sort_index" default="files.file_srl" order="desc" />
<index var="sort_index" default="files.file_srl" order="order_type" order_default="desc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />

View file

@ -47,7 +47,7 @@
</group>
</conditions>
<navigation>
<index var="sort_index" default="files.file_srl" order="desc" />
<index var="sort_index" default="files.file_srl" order="order_type" order_default="desc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />

View file

@ -23,10 +23,31 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<thead>
<tr>
<th scope="col">{$lang->file}</th>
<th scope="col" class="nowr">{$lang->file_size}</th>
<th scope="col" class="nowr">{$lang->cmd_download}</th>
<th scope="col" class="nowr">
<a href="{getUrl('', 'module', 'admin', 'act', 'dispFileAdminList', 'sort_index', 'file_size', 'order_type', ($order_type == 'asc') ? 'desc' : 'asc')}">
{$lang->file_size}
<block cond="$sort_index == 'file_size'">
<em cond="$order_type=='asc'"></em><em cond="$order_type != 'asc'"></em>
</block>
</a>
</th>
<th scope="col" class="nowr">
<a href="{getUrl('', 'module', 'admin', 'act', 'dispFileAdminList', 'sort_index', 'download_count', 'order_type', ($order_type == 'asc') ? 'desc' : 'asc')}">
{$lang->cmd_download}
<block cond="$sort_index == 'download_count'">
<em cond="$order_type=='asc'"></em><em cond="$order_type != 'asc'"></em>
</block>
</a>
</th>
<th scope="col" class="nowr">{$lang->author}</th>
<th scope="col" class="nowr">{$lang->date}</th>
<th scope="col" class="nowr">
<a href="{getUrl('', 'module', 'admin', 'act', 'dispFileAdminList', 'sort_index', 'regdate', 'order_type', ($order_type == 'asc') ? 'desc' : 'asc')}">
{$lang->date}
<block cond="$sort_index == 'regdate'">
<em cond="$order_type=='asc'"></em><em cond="$order_type != 'asc'"></em>
</block>
</a>
</th>
<th scope="col" class="nowr">{$lang->ipaddress}</th>
<th scope="col" class="nowr">{$lang->status}</th>
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>