Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Some small fixes to restore browser.
Browse files Browse the repository at this point in the history
- Convert unix time to human readable time
- Use mtime instead of atime
- Add uid and gid
- Use col-md-3 and col-md-9 instead of col-md-4 and col-md-8
  • Loading branch information
Marco van Wieringen committed Jul 18, 2015
1 parent 6cc0dee commit 92e4878
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions module/Restore/view/restore/restore/index.phtml
Expand Up @@ -53,7 +53,7 @@ $this->headTitle($title);

<div class="row">

<div class="col-md-4">
<div class="col-md-3">

<?php
if($this->restore_params['type'] == "client") {
Expand All @@ -80,7 +80,7 @@ $this->headTitle($title);

</div>

<div class="col-md-8">
<div class="col-md-9">
<?php
if($this->restore_params['type'] == "client") {
//echo $this->formRow($form->get('jobids_display')->setAttribute('class','form-control')); // for debugging
Expand All @@ -98,7 +98,7 @@ $this->headTitle($title);
</div>

<div class="row">
<div class="col-md-4">
<div class="col-md-3">
<?php echo $this->formSubmit($form->get('submit')->setAttribute('class','btn btn-primary')); ?>
</div>
</div>
Expand All @@ -115,6 +115,15 @@ $this->headTitle($title);

<script type="text/javascript">

function unix_to_human(UNIX_timestamp) {

var t = new Date(UNIX_timestamp * 1000);
var formatted = t.toUTCString();

return formatted;

}

function getFiles() {

var checked_files = [];
Expand Down Expand Up @@ -216,8 +225,10 @@ $this->headTitle($title);
'grid' : {
columns: [
{ width: 400, header: "Name"},
{ width: 200, header: "Size", value: function(node){ return(node.data.stat.size); } },
{ header: "Date", value: function(node){ return(node.data.stat.atime); } }
{ width: 100, header: "Size", value: function(node) { return(node.data.stat.size); } },
{ width: 75, header: "User", value: function(node) { return(node.data.stat.uid); } },
{ width: 75, header: "Group", value: function(node) { return(node.data.stat.gid); } },
{ header: "Date", value: function(node) { return(unix_to_human(node.data.stat.mtime)); } }
],
resizable: true,
},
Expand Down

0 comments on commit 92e4878

Please sign in to comment.