mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
- added language selection support to simple template, and the backend for it in language.exc.php
only need to get thumbnails working, and make a fully featured web 2.0/6.3/whatever template and dList should be ready for its initial public release. git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@14 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
@@ -1,34 +1,26 @@
|
||||
<table border="0" cellspacing="1" cellpadding="0" id="list">
|
||||
<tr>
|
||||
<th class="icon"></th>
|
||||
<th class="name"><a href="<?=Sort::get_url('name')?>"><?=$lang->name?></a></th>
|
||||
<th class="size"><a href="<?=Sort::get_url('size')?>"><?=$lang->size?></a></th>
|
||||
<th class="mtime"><a href="<?=Sort::get_url('mtime')?>"><?=$lang->mtime?></a></th>
|
||||
<th class="perms"><a href="<?=Sort::get_url('perms')?>"><?=$lang->perms?></a></th>
|
||||
<th class="owner"><a href="<?=Sort::get_url('owner')?>"><?=$lang->owner?></a></th>
|
||||
<? foreach ($fields as $key => $value): ?><th class="<?=$key?>"><a href="<?=Sort::get_url($key)?>"><?=$lang->$key?></a></th>
|
||||
<? endforeach ?>
|
||||
</tr>
|
||||
<? if ( !$is_root ): ?>
|
||||
<tr>
|
||||
<td class="icon"><a href="../" title="<?=$lang->parent_dir?>"><img src="<?=Icon::get_parent($config->tpl_icon_size)?>" class="" alt="" /></a></td>
|
||||
<td class="name"><a href="../" title="<?=$lang->parent_dir?>">..</a></td>
|
||||
<td class="size">-</td>
|
||||
<td class="mtime">-</td>
|
||||
<td class="perms"><?=$parent['perms']?></td>
|
||||
<td class="owner"><?=$parent['owner']?></td>
|
||||
<? foreach ($fields as $key => $value):
|
||||
if ($key == 'name'):?><td class="name"><a href="../" title="<?=$lang->parent_dir?>">..</a></td>
|
||||
<? else: ?><td></td><? endif ?>
|
||||
<? endforeach ?>
|
||||
</tr>
|
||||
<? endif ?>
|
||||
<? foreach ($dlist->list as $key => $item): ?>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>" title="<?=$item['name']?>">
|
||||
<img src="<?=Icon::get_url($item['ext'], 'small', $item['type'])?>" class="" alt="" />
|
||||
</a>
|
||||
<a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>" title="<?=$item['name']?>"><img src="<?=Icon::get_url($item['ext'], 'small', $item['type'])?>" class="" alt="" /></a>
|
||||
</td>
|
||||
<td class="name"><a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>"><?=$item['name']?></a></td>
|
||||
<td class="size"><?=$item['size']?></td>
|
||||
<td class="mtime"><?=$item['mtime']?></td>
|
||||
<td class="perms"><?=$item['perms']?></td>
|
||||
<td class="owner"><?=$item['owner']?></td>
|
||||
<? foreach ($fields as $key => $value):
|
||||
if ($key == 'name'):?><td class="name"><a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>"><?=$item['name']?></a></td>
|
||||
<? else: ?><td class="<?=$key?>"><?=$item[$key]?></td><? endif ?><? endforeach ?>
|
||||
</tr>
|
||||
<? endforeach ?>
|
||||
</table>
|
||||
@@ -1,6 +1,8 @@
|
||||
<table border="0" cellspacing="0" cellpadding="0" id="icons"><tr><td>
|
||||
<div id="sort-nav">
|
||||
<a href="<?=Sort::get_url('name')?>"><?=$lang->name?></a> | <a href="<?=Sort::get_url('size')?>"><?=$lang->size?></a> | <a href="<?=Sort::get_url('mtime')?>"><?=$lang->mtime?></a>
|
||||
<a href="<?=Sort::get_url('name')?>"<? if($current_sort == 'name'): ?> class="current"<? endif ?>><?=$lang->name?></a> |
|
||||
<a href="<?=Sort::get_url('size')?>"<? if($current_sort == 'size'): ?> class="current"<? endif ?>><?=$lang->size?></a> |
|
||||
<a href="<?=Sort::get_url('mtime')?>"<? if($current_sort == 'mtime'): ?> class="current"<? endif ?>><?=$lang->mtime?></a>
|
||||
</div>
|
||||
<ul>
|
||||
<? if ( !$is_root ): ?>
|
||||
|
||||
@@ -13,17 +13,18 @@
|
||||
</head>
|
||||
<body id="index">
|
||||
<div id="header">
|
||||
<?=$lang->index_of.' '.DIR_URL?>
|
||||
<?=$lang->index_of.' '.Path::url2links(DIR_URL)?>
|
||||
</div>
|
||||
<div id="view-nav">
|
||||
<a href="javascript:;" onclick="set_view('icons')"><?=$lang->icons?></a> | <a href="javascript:;" onclick="set_view('details')"><?=$lang->details?></a>
|
||||
<a href="javascript:;" onclick="set_view('icons');"><?=$lang->icons?></a> | <a href="javascript:;" onclick="set_view('details');"><?=$lang->details?></a>
|
||||
</div>
|
||||
<div id="server-info"><?=SERVER_INFO?></div>
|
||||
<div id="files">
|
||||
<? include(TPL_PATH.$config->tpl_mode) ?>
|
||||
</div>
|
||||
<div id="stats">
|
||||
<div id="timer">Powered by dList. <?=$timer->end()?>.</div>
|
||||
<div id="timer"><?=$lang->powered_by?>. <?=$timer->end()?>.</div>
|
||||
<div id="lang-select"><? foreach ($installed_languages as $key => $value): ?><a href="javascript:;" onclick="set_lang('<?=$value?>')"><?=ucfirst($value)?></a><? if(count($installed_languages)-1 != $key) echo ' | '; endforeach ?></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,6 +6,13 @@ function set_view (view) {
|
||||
}
|
||||
}
|
||||
|
||||
function set_lang (lang) {
|
||||
if (lang != readCookie('dList_language')) {
|
||||
createCookie('dList_language', lang, 365);
|
||||
document.location.href = '';
|
||||
}
|
||||
}
|
||||
|
||||
/* Cookie Related Functions */
|
||||
function createCookie(name,value,days) {
|
||||
if (days) {
|
||||
|
||||
@@ -35,6 +35,11 @@ if ( !empty($_COOKIE['dList_simple_viewMode']) && !empty($config->tpl_modes[$_CO
|
||||
$config->tpl_mode = $config->tpl_modes[$config->tpl_mode];
|
||||
}
|
||||
|
||||
|
||||
//>Section> installed_languages
|
||||
$installed_languages = installed_languages();
|
||||
|
||||
|
||||
//>Section> include_phtml
|
||||
include(TPL_PATH.'index.phtml');
|
||||
|
||||
|
||||
@@ -10,6 +10,13 @@ BODY {
|
||||
font: 20px "Myriad Pro", "Trebuchet MS", Verdana, sans-serif;
|
||||
padding: 15px 15px 30px 30px;
|
||||
}
|
||||
#header A {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
#header A:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#files {
|
||||
|
||||
@@ -39,7 +46,7 @@ BODY {
|
||||
width: 75px;
|
||||
}
|
||||
#list TH.mtime {
|
||||
width: 175px;
|
||||
width: 170px;
|
||||
}
|
||||
#list TH.perms {
|
||||
width: 100px;
|
||||
@@ -48,8 +55,10 @@ BODY {
|
||||
width: 85px;
|
||||
}
|
||||
#list TH A {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* list cells */
|
||||
@@ -67,14 +76,22 @@ BODY {
|
||||
text-align: right;
|
||||
}
|
||||
#list TD.perms {
|
||||
|
||||
text-align: right;
|
||||
}
|
||||
#list TD.owner {
|
||||
|
||||
text-align: right;
|
||||
}
|
||||
#list TD.name A {
|
||||
width: 100%;
|
||||
color: #000;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
}
|
||||
#list TD.name A:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#list TD.name A:visited {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +103,7 @@ BODY {
|
||||
#icons UL {
|
||||
list-style: none;
|
||||
margin-top: 5px;
|
||||
padding: 10px;
|
||||
}
|
||||
#icons UL A {
|
||||
color: #000;
|
||||
@@ -113,12 +131,21 @@ BODY {
|
||||
font-size: 10px;
|
||||
margin: 0px;
|
||||
}
|
||||
#icons #sort-nav {
|
||||
#sort-nav {
|
||||
color: #999;
|
||||
text-align: center;
|
||||
margin: 20px 20px 0px 20px;
|
||||
}
|
||||
|
||||
|
||||
#sort-nav A {
|
||||
color: #777;
|
||||
text-decoration: none;
|
||||
}
|
||||
#sort-nav A:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#sort-nav A.current {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* misc. */
|
||||
@@ -156,4 +183,24 @@ BODY {
|
||||
font-style: italic;
|
||||
font-size: 9px;
|
||||
text-align: left;
|
||||
}
|
||||
float: left;
|
||||
}
|
||||
|
||||
#lang-select {
|
||||
color: #BBB;
|
||||
padding: 3px;
|
||||
font-style: italic;
|
||||
font-size: 9px;
|
||||
float: right;
|
||||
}
|
||||
#lang-select A {
|
||||
color: #BBB;
|
||||
text-decoration: none;
|
||||
}
|
||||
#lang-select A:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user