mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
#64 Admin Responsive - Next Round
This commit is contained in:
@@ -110,4 +110,86 @@ class Navigation
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw items
|
||||
*
|
||||
* <code>
|
||||
* Navigation::draw('content');
|
||||
* Navigation::draw('top', Navigation::TOP);
|
||||
* <code>
|
||||
*
|
||||
* @param string $category Category
|
||||
* @param integer $type Type. Default is LEFT
|
||||
*/
|
||||
public static function get($category, $type = Navigation::LEFT) {
|
||||
|
||||
// Sort items by priority
|
||||
$items = Arr::subvalSort(Navigation::$items, 'priority');
|
||||
|
||||
// Draw left navigation
|
||||
if ($type == Navigation::LEFT) {
|
||||
|
||||
// Loop trough the items
|
||||
foreach ($items as $item) {
|
||||
|
||||
// If current plugin id == selected item id then set class to current
|
||||
if (Request::get('id') == $item['id'] && $item['external'] == false) $class = 'class = "current" '; else $class = '';
|
||||
|
||||
// If current category == item category and navigation type is left them draw this item
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
|
||||
|
||||
// Is external item id or not ?
|
||||
if ($item['external'] == false) {
|
||||
echo '<li><a '.$class.'href="index.php?id='.$item['id'].'">'.$item['name'].'</a></li>';
|
||||
} else {
|
||||
echo '<li><a target="_blank" href="'.$item['id'].'">'.$item['name'].'</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($type == Navigation::TOP) {
|
||||
// Draw top navigation
|
||||
foreach ($items as $item) {
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::TOP) {
|
||||
if ($item['external'] == false) {
|
||||
echo '<a class="btn btn-small btn-inverse" href="index.php?id='.$item['id'].'">'.$item['name'].'</a>'.Html::nbsp(2);
|
||||
} else {
|
||||
echo '<a target="_blank" class="btn btn-small btn-inverse" href="'.$item['id'].'">'.$item['name'].'</a>'.Html::nbsp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw dropdown items
|
||||
*
|
||||
* <code>
|
||||
* Navigation::getDropdown('content');
|
||||
* <code>
|
||||
*
|
||||
* @param string $category Category
|
||||
*/
|
||||
public static function getDropdown($category) {
|
||||
|
||||
// Sort items by priority
|
||||
$items = Arr::subvalSort(Navigation::$items, 'priority');
|
||||
|
||||
// Loop trough the items
|
||||
foreach ($items as $item) {
|
||||
|
||||
// If current plugin id == selected item id then set class to current
|
||||
if (Request::get('id') == $item['id'] && $item['external'] == false) $class = 'selected = "selected" '; else $class = '';
|
||||
|
||||
// If current category == item category and navigation type is left them draw this item
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
|
||||
|
||||
// Is external item id or not ?
|
||||
if ($item['external'] == false) {
|
||||
echo '<option '.$class.'rel="index.php?id='.$item['id'].'">'.$item['name'].'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -40,8 +40,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Name', 'filesmanager'); ?></th>
|
||||
<th><?php echo __('Extension', 'filesmanager'); ?></th>
|
||||
<th><?php echo __('Size', 'filesmanager'); ?></th>
|
||||
<th class="hidden-phone"><?php echo __('Extension', 'filesmanager'); ?></th>
|
||||
<th class="hidden-phone"><?php echo __('Size', 'filesmanager'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -73,10 +73,10 @@
|
||||
<td<?php if (isset(File::$mime_types[$ext]) && preg_match('/image/', File::$mime_types[$ext])) echo ' class="image"'?>>
|
||||
<?php echo Html::anchor(File::name($file), $site_url.'public/' . $path.$file, array('target'=>'_blank'));?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $ext; ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo Number::byteFormat(filesize($files_path. DS .$file)); ?>
|
||||
</td>
|
||||
<td>
|
||||
|
@@ -20,9 +20,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Username', 'users'); ?></th>
|
||||
<th><?php echo __('Email', 'users'); ?></th>
|
||||
<th><?php echo __('Registered', 'users'); ?></th>
|
||||
<th><?php echo __('Role', 'users'); ?></th>
|
||||
<th class="hidden-phone"><?php echo __('Email', 'users'); ?></th>
|
||||
<th class="hidden-phone"><?php echo __('Registered', 'users'); ?></th>
|
||||
<th class="hidden-phone"><?php echo __('Role', 'users'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -32,13 +32,13 @@
|
||||
<td>
|
||||
<?php echo Html::toText($user['login']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo Html::toText($user['email']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo Date::format($user['date_registered']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $roles["{$user['role']}"]; ?>
|
||||
</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user