Commit 9abbaf23 authored by M.Nowocyn's avatar M.Nowocyn

Add dashboard for the Adminpanel.

Add Lang/Keys into the Entities file.
parent 168c423a
......@@ -12,4 +12,4 @@ iko.admin = {
});
},
}
};
\ No newline at end of file
};
......@@ -29,6 +29,7 @@ use Iko\Module;
use Iko\Session;
use Iko\User;
use Iko\CMS\Page;
use Iko\User\iUser;
class cms
{
......@@ -40,7 +41,32 @@ class cms
private function dashboard ()
{
$this->template->content = "Test";
$users = User::getLatest(5);
$user_list = "";
foreach ($users as $user) {
if ($user instanceof iUser) {
$user_list .= Entity::returnEntity(
"dashboard.user.list.entry",
array (
"user_id" => $user->getID(),
"user_name" => $user->getName(),
"user_date_joined" => $user->getJoinedDate(),
"user_email" => $user->getEmail(),
"user_edit_link" => Core::Link(
array (
"module" => "admin",
"sub" => "user",
"page" => "edit",
"id" => $user->getID())
))
);
}
}
$this->template->content = Entity::returnEntity(
"dashboard",
array ("user_list" => $user_list)
);
}
private function configurations ()
......@@ -141,8 +167,6 @@ class cms
"admin"
);
$this->template = $template;
$template->user_image = User::getSession()->getAvatar();
$template->displayname = User::getSession()->getName();
/*$menu = Handler::event("iko.admin.menu", array(), null, array());
$list = "";
foreach($menu as $key => $item) {
......@@ -195,6 +219,7 @@ class cms
(new Page(-1));
}
}
}
else {
$this->dashboard();
......
......@@ -62,7 +62,7 @@
</html><!-- end:acp-login --><!-- start:settings -->
<form class="" action="javascript:iko.admin.settings.change();" name="iko_configurations">
<div class="form-group row">
<label for="inputSitename" class="col-sm-2 control-label">Sitename</label>
<label for="inputSitename" class="col-sm-2 control-label">[[ iko.admin.sitename ]]</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputSitename" placeholder="Your Sitename" name="sitename" value="%% site_name %%">
</div>
......@@ -72,7 +72,7 @@
<div class="col-sm-5">
<div class="row">
<div class="col-sm-5">
<label for="ckbRewrite" class="control-label">Rewrite URL</label>
<label for="ckbRewrite" class="control-label">[[ iko.admin.rewriteurl ]]</label>
</div>
<div class="col-sm-2">
<input type="checkbox" name="rewriteURL" %% rewrite_checked %% id="ckbRewrite">
......@@ -80,7 +80,7 @@
</div>
</div>
<div class="col-sm-7">
<p>Example: <br> <span class="text-danger">Off</span> http://www.example.com/?module=admin&sub=user&page=all<br> <span class="text-success">On</span> http://www.example.com/admin/user/all/?extras </p>
<p>[[ example ]]: <br> <span class="text-danger">Off</span> http://www.example.com/?module=admin&sub=user&page=all<br> <span class="text-success">On</span> http://www.example.com/admin/user/all/?extras </p>
</div>
</div>
<div class="form-group">
......@@ -89,4 +89,4 @@
</div>
</div>
</form><!-- end:settings --><!-- start:javascript -->
<script src="%% path %%"></script><!-- end:javascript -->
\ No newline at end of file
<script src="%% path %%"></script><!-- end:javascript -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment