mirror of
https://github.com/danbee/neompc
synced 2025-03-04 08:39:10 +00:00
~ Further work on the browse page.
This commit is contained in:
parent
05a7376a50
commit
fd1ac240ba
25
lib/page.php
25
lib/page.php
@ -192,21 +192,26 @@
|
|||||||
|
|
||||||
if ($browse == '/') {
|
if ($browse == '/') {
|
||||||
$browse = '';
|
$browse = '';
|
||||||
|
$browse_list = array('/');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$browse_list = array_merge(array('/'), explode('/', $browse));
|
||||||
}
|
}
|
||||||
|
|
||||||
$browse_list = explode('/', $browse);
|
//print_r($browse_list);
|
||||||
|
|
||||||
//print_r($browse);
|
|
||||||
|
|
||||||
if ($browse) {
|
|
||||||
|
|
||||||
foreach ($browse_list as $browse_item) {
|
|
||||||
$path .= $browse_item . '/';
|
|
||||||
$dir_list[] = array('path' => urlencode(trim($path, '/')), 'name' => $browse_item);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
foreach ($browse_list as $key => $browse_item) {
|
||||||
|
$path .= $browse_item . '/';
|
||||||
|
$dir_list[] = array(
|
||||||
|
'path' => ($path == '//' ? '/' : urlencode(trim($path, '/'))),
|
||||||
|
'name' => $browse_item
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$smarty->assign('browse_header', $browse_item);
|
||||||
|
$parent_key = $key - 1;
|
||||||
|
$smarty->assign('browse_parent_link', $dir_list[$parent_key]['path']);
|
||||||
|
|
||||||
$smarty->assign('dir_list', $dir_list);
|
$smarty->assign('dir_list', $dir_list);
|
||||||
|
|
||||||
if (!$browselist) {
|
if (!$browselist) {
|
||||||
|
|||||||
@ -1,14 +1,19 @@
|
|||||||
|
|
||||||
<ul id="crumb_trail">
|
<!--<ul id="crumb_trail">
|
||||||
<li><a href="{:$home_link:}"><img src="templates/{:$template:}/images/home.gif" alt="Home" /></a></li>
|
<li><a href="{:$home_link:}"><img src="templates/{:$template:}/images/home.gif" alt="Home" /></a></li>
|
||||||
|
|
||||||
{:foreach from=$dir_list item=dir_list_item:}
|
{:foreach from=$dir_list item=dir_list_item:}
|
||||||
<li>• <a href="index.php?browse={:$dir_list_item.path:}">{:$dir_list_item.name|escape:'html':}</a></li>
|
<li>• <a href="index.php?browse={:$dir_list_item.path:}">{:$dir_list_item.name|escape:'html':}</a></li>
|
||||||
{:/foreach:}
|
{:/foreach:}
|
||||||
|
|
||||||
</ul>
|
</ul>-->
|
||||||
|
|
||||||
<div id="buttons"><a href="index.php?action=playall"><img src="templates/{:$template:}/images/playall.gif" /></a> <a href="index.php?action=addall"><img src="templates/{:$template:}/images/addall.gif" /></a></div>
|
<div id="browse_parent">
|
||||||
|
{:if $browse_parent_link:}<a href="index.php?browse={:$browse_parent_link:}" id="browse_back"> </a>{:/if:}
|
||||||
|
<p>{:$browse_header|escape:'html':}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<div id="buttons"><a href="index.php?action=playall"><img src="templates/{:$template:}/images/playall.gif" /></a> <a href="index.php?action=addall"><img src="templates/{:$template:}/images/addall.gif" /></a></div>-->
|
||||||
|
|
||||||
<div id="list">
|
<div id="list">
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
|
|||||||
0
templates/default/images/buttons.png
Executable file → Normal file
0
templates/default/images/buttons.png
Executable file → Normal file
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
0
templates/default/images/repeat.png
Executable file → Normal file
0
templates/default/images/repeat.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
templates/default/images/shuffle.png
Executable file → Normal file
0
templates/default/images/shuffle.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@ -65,6 +65,24 @@ p {
|
|||||||
width: 106px;
|
width: 106px;
|
||||||
text-shadow: 0 0 12px rgba(150, 210, 255, 0.9);
|
text-shadow: 0 0 12px rgba(150, 210, 255, 0.9);
|
||||||
}
|
}
|
||||||
|
#browse_parent {
|
||||||
|
height: 30px;
|
||||||
|
padding: 0;
|
||||||
|
width: 320px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#browse_parent p {
|
||||||
|
padding: 8px 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
#browse_parent a#browse_back {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 45px;
|
||||||
|
height: 30px;
|
||||||
|
margin-right: 10px;
|
||||||
|
background: url(templates/{:$template:}/images/back.png) center center no-repeat;
|
||||||
|
}
|
||||||
#page {
|
#page {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
clear: left;
|
clear: left;
|
||||||
@ -72,6 +90,7 @@ p {
|
|||||||
#list {
|
#list {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
#list ul {
|
#list ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
@ -81,7 +100,7 @@ p {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
#list ul.list {
|
#list ul.list {
|
||||||
margin-top: 10px;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
#list ul li {
|
#list ul li {
|
||||||
padding: 3px 10px 3px 10px;
|
padding: 3px 10px 3px 10px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user