From a30d32a0075e0fcf39fb49a124e8a5a8bbbf74bd Mon Sep 17 00:00:00 2001 From: Darko Date: Tue, 7 Jul 2015 10:15:55 +0200 Subject: [PATCH] Fixed the search function, enabled modals for browse page. --- .../charisma/views/frontend/browse.tpl | 395 +++++++------ .../charisma/views/frontend/search.tpl | 529 ++++++++++------- .../omicron/views/frontend/browse.tpl | 14 +- .../omicron/views/frontend/search.tpl | 553 +++++++++++------- 4 files changed, 862 insertions(+), 629 deletions(-) diff --git a/www/templates/charisma/views/frontend/browse.tpl b/www/templates/charisma/views/frontend/browse.tpl index fb109463b..13fbecdf4 100644 --- a/www/templates/charisma/views/frontend/browse.tpl +++ b/www/templates/charisma/views/frontend/browse.tpl @@ -13,205 +13,210 @@ {$site->adbrowse} {if $results|@count > 0} -
-
-
-
-
-
-
-
-
-
- {if isset($shows)} -

- Series List | - Manage - My Shows | - Rss - Feed -

- {/if} -
- {if ($category >= '1000' and $category <= '1999')}View: - Covers - | - List -
- {elseif ($category >= '2000' and $category <= '2100')}View: - Covers - | - List -
- {elseif ($category >= '3000' and $category <= '3999')}View: - Covers - | - List -
- {elseif ($category == '4050')}View: - Covers - | - List -
- {elseif ($category == '6000' OR '6080' OR '6070' OR '6020' OR '6040')}View: - Covers - | - List -
- {elseif $category == '7000'}View: - Covers - | - List -
- {/if} - With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
-
- - - - - - - - - - - - - {foreach from=$results item=result} - - - - - - - - - {/foreach} - -
Name - - - - - - - CategoryPostedSizeAction
- {$result.searchname|escape:"htmlall"|replace:".":" "} -
- {$result.grabs} - Grab{if $result.grabs != 1}s{/if} - {if $result.nfoid > 0}NFO{/if} - {if $result.jpgstatus == 1 && $userdata.canpreview == 1}Sample{/if} - {if $result.haspreview == 1 && $userdata.canpreview == 1}Preview{/if} - {if $result.rageid > 0}View TV{/if} - {if $result.anidbid > 0}View Anime{/if} -
{$result.category_name} - {$result.postdate|timeago}{$result.size|fsize_format:"MB"} - - - {if isset($sabintegrated)} - - {/if} - {if $weHasVortex} - - {/if} -
-
-
-
- {if isset($section) && $section != ''}View: - Covers - | - List -
- {/if} - With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
+ +
+
+
+
+
+
+ {if isset($shows)} +

+ Series List | + Manage + My Shows | + Rss + Feed +

+ {/if} +
+ {if ($category >= '1000' and $category <= '1999')}View: + Covers + | + List +
+ {elseif ($category >= '2000' and $category <= '2100')}View: + Covers + | + List +
+ {elseif ($category >= '3000' and $category <= '3999')}View: + Covers + | + List +
+ {elseif ($category == '4050')}View: + Covers + | + List +
+ {elseif ($category == '6000' OR '6080' OR '6070' OR '6020' OR '6040')}View: + Covers + | + List +
+ {elseif $category == '7000'}View: + Covers + | + List +
+ {/if} + With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if}
+
+ {$pager} +
+
+
+ + + + + + + + + + + + + {foreach from=$results item=result} + + + + + + + + + {/foreach} + +
Name + + + + + + + CategoryPostedSizeAction
+ {$result.searchname|escape:"htmlall"|replace:".":" "} +
+ {$result.grabs} + Grab{if $result.grabs != 1}s{/if} + {if $result.nfoid > 0}NFO{/if} + {if $result.jpgstatus == 1 && $userdata.canpreview == 1}Sample{/if} + {if $result.haspreview == 1 && $userdata.canpreview == 1}Preview{/if} + {if $result.rageid > 0}View TV{/if} + {if $result.anidbid > 0}View Anime{/if} +
{$result.category_name} + {$result.postdate|timeago}{$result.size|fsize_format:"MB"} + + + {if isset($sabintegrated)} + + {/if} + {if $weHasVortex} + + {/if} +
+
+
+
+
+ {if isset($section) && $section != ''}View: + Covers + | + List +
+ {/if} + With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if} +
+
+
+
+ {$pager} +
- +
-
-{/if} + +{/if} \ No newline at end of file diff --git a/www/templates/charisma/views/frontend/search.tpl b/www/templates/charisma/views/frontend/search.tpl index 8dbd0510a..c64c4001c 100644 --- a/www/templates/charisma/views/frontend/search.tpl +++ b/www/templates/charisma/views/frontend/search.tpl @@ -1,3 +1,6 @@ +{if {$site->adbrowse} != ''} + {$site->adbrowse} +{/if}

newznab-tmux > Search

@@ -8,15 +11,21 @@
- -
- {if $sadvanced}Basic{else}Advanced{/if} - Search + +
-
+
@@ -29,231 +38,337 @@
-
- - + + - - + + - - + + - - - - - + - + + + + + + + + + + + + + + + + +
:
:
:{html_options id="searchadvgroups" name=searchadvgroups options=$grouplist selected=$selectedgroup}
:{html_options id="searchadvcat" name=searchadvcat options=$catlist selected=$selectedcat}
: - {html_options id="searchadvsizefrom" name=searchadvsizefrom options=$sizelist selected=$selectedsizefrom} - and {html_options id="searchadvsizeto" name=searchadvsizeto options=$sizelist selected=$selectedsizeto} +
- - + +
{html_options class="searchadvbtns" id="searchadvgroups" name="searchadvgroups" options=$grouplist selected=$selectedgroup}
{html_options class="searchadvbtns" id="searchadvcat" name="searchadvcat" options=$catlist selected=$selectedcat}
+ {html_options id="searchadvsizefrom" name="searchadvsizefrom" options=$sizelist selected=$selectedsizefrom} + {html_options id="searchadvsizeto" name="searchadvsizeto" options=$sizelist selected=$selectedsizeto} +
+ + + + +
+ +
- -{if $results|@count == 0 && $search != ""} -
-

No result!

- Your search - {$search|escape:'htmlall'} - did not match any releases. -

- Suggestions: -

-
    -
  • Make sure all words are spelled correctly.
  • -
  • Try different keywords.
  • -
  • Try more general keywords.
  • -
  • Try fewer keywords.
  • -
-
-{elseif $search == ""} +{if $results|@count == 0 && ($search || $subject|| $searchadvr|| $searchadvsubject || $selectedgroup || $selectedsizefrom || $searchadvdaysold) != ""} +
+
+ Your search did not match any releases. +

+ Suggestions: +

+
    +
  • Make sure all words are spelled correctly.
  • +
  • Try different keywords.
  • +
  • Try more general keywords.
  • +
  • Try fewer keywords.
  • +
+
+
+{elseif ($search || $subject || $searchadvr || $searchadvsubject || $selectedgroup || $selectedsizefrom || $searchadvdaysold) == ""} {else} - - {$site->adbrowse} -
-
-
-
-
-
-
-
- -
-
- {if isset($shows)} -

- Series List | - Manage My Shows | - Rss - Feed -

- {/if} -
- {if isset($section) && $section != ''}View: - Covers - | - List -
- {/if} - With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($nzbgetintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
-
- - - - - - - - - - - - - {foreach from=$results item=result} - - - {/if} - - - - - - {/foreach} - -
- Name - - - - - - - CategoryPostedSizeAction
- {$result.searchname|escape:"htmlall"|replace:".":" "} -
- {$result.grabs} - Grab{if $result.grabs != 1}s{/if} {if $result.nfoid > 0} - NFO - -
{$result.category_name} - {$result.postdate|timeago}{$result.size|fsize_format:"MB"} - - - - {if isset($sabintegrated)} - - {/if} -
- - {if $results|@count > 10} -
-
-
- With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($nzbgetintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
-
- {/if} - -
-
-
+ +
+
+ {if isset($shows)} +

+ Series List | + Manage My Shows | + Rss + Feed +

+ {/if} +
+ {if isset($section) && $section != ''}View: + Covers + | + List +
+ {/if} + With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if}
- +
+
+
+ {$pager}
-
+ + + + + + + + + + + + {foreach from=$results item=result} + + + + + + + + + + + {/foreach} +
+ name
+ + Sort Descending + + + Sort Ascending + +
+ category
+ + Sort Descending + + + Sort Ascending + +
+ posted
+ + Sort Descending + + + Sort Ascending + +
+ size
+ + Sort Descending + + + Sort Ascending + +
+ files
+ + Sort Descending + + + Sort Ascending + +
stats
+ + Sort Descending + + + Sort Ascending + +
+ + +
+
+   +
+
+ {if $sabintegrated} +
+ {/if} +
+ + +
+ + {$result.name|escape:"htmlall"|truncate:150:"...":true} + +
+ {release_flag($result.searchname, browse)} + {if $result.passwordstatus == 1} + RAR/ZIP Possibly Passworded. + {elseif $result.passwordstatus == 2} + RAR/ZIP Possibly Damaged. + {elseif $result.passwordstatus == 10} + RAR/ZIP is Passworded. + {/if} + {if $result.videostatus > 0} + + + {/if} + {if $result.nfoid > 0} + Nfo + {/if} + {if $result.imdbid > 0} + Cover + {/if} + {if $result.haspreview == 1 && $userdata.canpreview == 1} + Preview{/if} + {if $result.jpgstatus == 1 && $userdata.canpreview == 1} + Sample{/if} + {if $result.musicinfoid > 0} + Cover + {/if} + {if $result.consoleinfoid > 0} + Cover + {/if} + {if $result.rageid > 0} + View Series + {/if} + {if $result.anidbid > 0} + View Anime + {/if} + {if $result.tvairdate != ""} + Aired {if $result.tvairdate|strtotime > $smarty.now}in future{else}{$result.tvairdate|daysago}{/if} + {/if} + {if $result.group_name != ""} + {$result.group_name|escape:"htmlall"|replace:"alt.binaries.":"a.b."} + {/if} +
+
+
+ {$result.category_name} + + {$result.postdate|timeago} + + {$result.size|fsize_format:"MB"} + {if $result.completion > 0} +
+ {if $result.completion < 100} + {$result.completion}% + {else} + {$result.completion}% + {/if} + {/if} +
+ {$result.totalpart} + {if $result.rarinnerfilecount > 0} +
+ {$result.guid} +
+ {/if} +
+ {$result.comments} cmt{if $result.comments != 1}s{/if} +
{$result.grabs} grab{if $result.grabs != 1}s{/if} +
+ +
+
+
+
+
+ With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if} +
+
+
+
+ {$pager} +
+
+


+ {/if} \ No newline at end of file diff --git a/www/templates/omicron/views/frontend/browse.tpl b/www/templates/omicron/views/frontend/browse.tpl index 8c7c5d769..de97ebd46 100644 --- a/www/templates/omicron/views/frontend/browse.tpl +++ b/www/templates/omicron/views/frontend/browse.tpl @@ -129,17 +129,15 @@
{$result.grabs} Grab{if $result.grabs != 1}s{/if} - {if $result.nfoid > 0} 0}NFO{/if} - {if $result.jpgstatus == 1 && $userdata.canpreview == 1}NFO{/if} + {if $result.jpgstatus == 1 && $userdata.canpreview == 1}Sample{/if} - {if $result.haspreview == 1 && $userdata.canpreview == 1}Sample{/if} + {if $result.haspreview == 1 && $userdata.canpreview == 1}Preview{/if} + name="name{$result.guid}" class="modal_prev label label-default" rel="preview">Preview{/if} {if $result.rageid > 0}View TV{/if} diff --git a/www/templates/omicron/views/frontend/search.tpl b/www/templates/omicron/views/frontend/search.tpl index 8dbd0510a..972346a24 100644 --- a/www/templates/omicron/views/frontend/search.tpl +++ b/www/templates/omicron/views/frontend/search.tpl @@ -1,3 +1,6 @@ +{if {$site->adbrowse} != ''} + {$site->adbrowse} +{/if}

newznab-tmux > Search

@@ -8,252 +11,364 @@
- -
- {if $sadvanced}Basic{else}Advanced{/if} - Search + +
-
-
-
- -
-
- - - -
+ +
+
+
- -
- +
+ + + +
+
+ +
- - + + - - + + - - + + - - - - - + - + + + + + + + + + + + + + + + + +
:
:
:{html_options id="searchadvgroups" name=searchadvgroups options=$grouplist selected=$selectedgroup}
:{html_options id="searchadvcat" name=searchadvcat options=$catlist selected=$selectedcat}
: - {html_options id="searchadvsizefrom" name=searchadvsizefrom options=$sizelist selected=$selectedsizefrom} - and {html_options id="searchadvsizeto" name=searchadvsizeto options=$sizelist selected=$selectedsizeto} +
- - + +
{html_options class="searchadvbtns" id="searchadvgroups" name="searchadvgroups" options=$grouplist selected=$selectedgroup}
{html_options class="searchadvbtns" id="searchadvcat" name="searchadvcat" options=$catlist selected=$selectedcat}
+ {html_options id="searchadvsizefrom" name="searchadvsizefrom" options=$sizelist selected=$selectedsizefrom} + {html_options id="searchadvsizeto" name="searchadvsizeto" options=$sizelist selected=$selectedsizeto} +
+ + + + +
+ +
- -{if $results|@count == 0 && $search != ""} -
-

No result!

- Your search - {$search|escape:'htmlall'} - did not match any releases. -

- Suggestions: -

-
    -
  • Make sure all words are spelled correctly.
  • -
  • Try different keywords.
  • -
  • Try more general keywords.
  • -
  • Try fewer keywords.
  • -
-
-{elseif $search == ""} +{if $results|@count == 0 && ($search || $subject|| $searchadvr|| $searchadvsubject || $selectedgroup || $selectedsizefrom || $searchadvdaysold) != ""} +
+
+ Your search did not match any releases. +

+ Suggestions: +

+
    +
  • Make sure all words are spelled correctly.
  • +
  • Try different keywords.
  • +
  • Try more general keywords.
  • +
  • Try fewer keywords.
  • +
+
+
+{elseif ($search || $subject || $searchadvr || $searchadvsubject || $selectedgroup || $selectedsizefrom || $searchadvdaysold) == ""} {else} - - {$site->adbrowse} -
-
-
-
-
-
-
-
- -
-
- {if isset($shows)} -

- Series List | - Manage My Shows | - Rss - Feed -

- {/if} -
- {if isset($section) && $section != ''}View: - Covers - | - List -
- {/if} - With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($nzbgetintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
-
- - - - - - - - - - - - - {foreach from=$results item=result} - - - {/if} - - - - - - {/foreach} - -
- Name - - - - - - - CategoryPostedSizeAction
- {$result.searchname|escape:"htmlall"|replace:".":" "} -
- {$result.grabs} - Grab{if $result.grabs != 1}s{/if} {if $result.nfoid > 0} - NFO - -
{$result.category_name} - {$result.postdate|timeago}{$result.size|fsize_format:"MB"} - - - - {if isset($sabintegrated)} - - {/if} -
- - {if $results|@count > 10} -
-
-
- With Selected: -
- - - {if isset($sabintegrated)} - - {/if} - {if isset($nzbgetintegrated)} - - {/if} - {if isset($isadmin)} - - - {/if} -
-
-
-
- {$pager} -
-
- {/if} - -
-
-
+ +
+
+ {if isset($shows)} +

+ Series List | + Manage My Shows | + Rss + Feed +

+ {/if} +
+ {if isset($section) && $section != ''}View: + Covers + | + List +
+ {/if} + With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if}
- +
+
+
+ {$pager}
-
+ + + + + + + + + + + + {foreach from=$results item=result} + + + + + + + + + + + {/foreach} +
+ name
+ + Sort Descending + + + Sort Ascending + +
+ category
+ + Sort Descending + + + Sort Ascending + +
+ posted
+ + Sort Descending + + + Sort Ascending + +
+ size
+ + Sort Descending + + + Sort Ascending + +
+ files
+ + Sort Descending + + + Sort Ascending + +
stats
+ + Sort Descending + + + Sort Ascending + +
+ + +
+
+   +
+
+ {if $sabintegrated} +
+ {/if} +
+ + +
+ + {$result.name|escape:"htmlall"|truncate:150:"...":true} + +
+ {release_flag($result.searchname, browse)} + {if $result.passwordstatus == 1} + RAR/ZIP Possibly Passworded. + {elseif $result.passwordstatus == 2} + RAR/ZIP Possibly Damaged. + {elseif $result.passwordstatus == 10} + RAR/ZIP is Passworded. + {/if} + {if $result.videostatus > 0} + + + {/if} + {if $result.nfoid > 0} + Nfo + {/if} + {if $result.imdbid > 0} + Cover + {/if} + {if $result.haspreview == 1 && $userdata.canpreview == 1} + Preview{/if} + {if $result.jpgstatus == 1 && $userdata.canpreview == 1} + Sample{/if} + {if $result.musicinfoid > 0} + Cover + {/if} + {if $result.consoleinfoid > 0} + Cover + {/if} + {if $result.rageid > 0} + View Series + {/if} + {if $result.anidbid > 0} + View Anime + {/if} + {if $result.tvairdate != ""} + Aired {if $result.tvairdate|strtotime > $smarty.now}in future{else}{$result.tvairdate|daysago}{/if} + {/if} + {if $result.group_name != ""} + {$result.group_name|escape:"htmlall"|replace:"alt.binaries.":"a.b."} + {/if} +
+
+
+ {$result.category_name} + + {$result.postdate|timeago} + + {$result.size|fsize_format:"MB"} + {if $result.completion > 0} +
+ {if $result.completion < 100} + {$result.completion}% + {else} + {$result.completion}% + {/if} + {/if} +
+ {$result.totalpart} + {if $result.rarinnerfilecount > 0} +
+ {$result.guid} +
+ {/if} +
+ {$result.comments} cmt{if $result.comments != 1}s{/if} +
{$result.grabs} grab{if $result.grabs != 1}s{/if} +
+ +
+
+
+
+
+ With Selected: +
+ + + {if isset($sabintegrated)} + + {/if} + {if isset($nzbgetintegrated)} + + {/if} + {if isset($isadmin)} + + + {/if} +
+
+
+
+ {$pager} +
+
+


+ {/if} \ No newline at end of file