<dl class="col-xs-12 col-md-4">
<dt></dt>
<dd>
- <input type="text" id="filename" name="filename" value="{$filename}" placeholder="{lang}wcf.media.filename{/lang}" class="long">
+ <input type="text" id="q" name="q" value="{$q}" placeholder="{lang}wcf.media.search.placeholder{/lang}" class="long">
</dd>
</dl>
{content}
{assign var='linkParameters' value=''}
{if $username}{capture append=linkParameters}&username={@$username|rawurlencode}{/capture}{/if}
- {if $filename}{capture append=linkParameters}&filename={@$filename|rawurlencode}{/capture}{/if}
+ {if $q}{capture append=linkParameters}&q={@$q|rawurlencode}{/capture}{/if}
{pages print=true assign=pagesLinks controller="MediaList" link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$linkParameters"}
{/content}
<th class="columnMark"><label><input type="checkbox" class="jsClipboardMarkAll"></label></th>
<th class="columnID columnMediaID{if $sortField == 'mediaID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='MediaList'}pageNo={@$pageNo}&sortField=mediaID&sortOrder={if $sortField == 'mediaID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
<th class="columnTitle columnFilename{if $sortField == 'filename'} active {@$sortOrder}{/if}"><a href="{link controller='MediaList'}pageNo={@$pageNo}&sortField=filename&sortOrder={if $sortField == 'filename' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.media.filename{/lang}</a></th>
+ <th class="columnText columnMediaTitle{if $sortField == 'title'} active {@$sortOrder}{/if}"><a href="{link controller='MediaList'}pageNo={@$pageNo}&sortField=title&sortOrder={if $sortField == 'title' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.global.title{/lang}</a></th>
<th class="columnDate columnUploadTime{if $sortField == 'uploadTime'} active {@$sortOrder}{/if}"><a href="{link controller='MediaList'}pageNo={@$pageNo}&sortField=uploadTime&sortOrder={if $sortField == 'uploadTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.media.uploadTime{/lang}</a></th>
<th class="columnDigits columnFilesize{if $sortField == 'filesize'} active {@$sortOrder}{/if}"><a href="{link controller='MediaList'}pageNo={@$pageNo}&sortField=filesize&sortOrder={if $sortField == 'filesize' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$linkParameters}{/link}">{lang}wcf.media.filesize{/lang}</a></th>
</div>
</div>
</td>
+ <td class="columnText columnMediaTitle">{$media->title|tableWordwrap}</td>
<td class="columnDate columnUploadTime">{@$media->uploadTime|time}</td>
<td class="columnDigits columnFilesize">{@$media->filesize|filesize}</td>
public $defaultSortOrder = 'DESC';
/**
- * searched media filename
+ * searched media query
* @var string
*/
- public $filename = '';
+ public $query = '';
/**
* @inheritDoc
parent::assignVariables();
WCF::getTPL()->assign([
- 'filename' => $this->filename,
+ 'q' => $this->query,
'hasMarkedItems' => ClipboardHandler::getInstance()->hasMarkedItems(ClipboardHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.media')),
'username' => $this->username
]);
protected function initObjectList() {
parent::initObjectList();
- if ($this->filename) {
- $this->objectList->addSearchConditions($this->filename);
+ if ($this->query) {
+ $this->objectList->addSearchConditions($this->query);
}
if ($this->username) {
$this->objectList->getConditionBuilder()->add('media.username LIKE ?', ['%'.addcslashes($this->username, '_%').'%']);
public function readParameters() {
parent::readParameters();
- if (isset($_REQUEST['filename'])) $this->filename = StringUtil::trim($_REQUEST['filename']);
+ if (isset($_REQUEST['q'])) $this->query = StringUtil::trim($_REQUEST['q']);
if (isset($_REQUEST['username'])) $this->username = StringUtil::trim($_REQUEST['username']);
$parameters = [];
if ($this->sortField) $parameters['sortField'] = $this->sortField;
if ($this->sortOrder) $parameters['sortOrder'] = $this->sortOrder;
- if ($this->filename) $parameters['filename'] = $this->filename;
+ if ($this->query) $parameters['q'] = $this->query;
if ($this->username) $parameters['username'] = $this->username;
$this->canonicalURL = LinkHandler::getInstance()->getLink('MediaList', $parameters);