[enh] Cleanup backup views, add backup info.

This commit is contained in:
opi 2015-10-08 12:56:26 +02:00
parent 88c3824b0f
commit 9cb5948b1a
6 changed files with 63 additions and 43 deletions

View file

@ -245,6 +245,7 @@
"user_mailbox_quota": "Mailbox quota", "user_mailbox_quota": "Mailbox quota",
"mailbox_quota_description": "Mailbox quota must be a size with b/k/M/G/T suffix or 0 to disable the quota.", "mailbox_quota_description": "Mailbox quota must be a size with b/k/M/G/T suffix or 0 to disable the quota.",
"backup_content": "Backup content",
"local_archives": "Local archives", "local_archives": "Local archives",
"storages_new": "New remote storage", "storages_new": "New remote storage",
"storages_no": "No storages.", "storages_no": "No storages.",
@ -259,6 +260,7 @@
"backup_create": "Create a backup", "backup_create": "Create a backup",
"restore": "Restore", "restore": "Restore",
"download": "Download", "download": "Download",
"created_at": "Created at",
"hook_data_home": "User data", "hook_data_home": "User data",
"hook_data_home_desc": "User data located in /home/USER", "hook_data_home_desc": "User data located in /home/USER",
"hook_data_mail": "Mail", "hook_data_mail": "Mail",

View file

@ -226,6 +226,7 @@
"user_new_mail": "nouvelle_adresse@domaine.org", "user_new_mail": "nouvelle_adresse@domaine.org",
"user_new_forward": "nouveau_transfert@domainedistant.org", "user_new_forward": "nouveau_transfert@domainedistant.org",
"backup_content": "Contenu de la sauvegarde",
"local_archives": "Archives locales", "local_archives": "Archives locales",
"storages_new": "Nouveau stockage distant", "storages_new": "Nouveau stockage distant",
"storages_no": "Aucun stockage.", "storages_no": "Aucun stockage.",
@ -240,6 +241,7 @@
"backup_create": "Créer une sauvegarde", "backup_create": "Créer une sauvegarde",
"restore": "Restaurer", "restore": "Restaurer",
"download": "Télécharger", "download": "Télécharger",
"created_at": "Crée le",
"hook_data_home": "Données utilisateurs", "hook_data_home": "Données utilisateurs",
"hook_data_home_desc": "Les données des utilisateurs situées dans /home/USER", "hook_data_home_desc": "Les données des utilisateurs situées dans /home/USER",
"hook_data_mail": "Mail", "hook_data_mail": "Mail",

View file

@ -1,8 +1,6 @@
<div class="btn-breadcrumb"> <div class="btn-breadcrumb">
<a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a> <a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/backup" class="btn btn-default">{{t 'backup'}}</a> <a href="#/backup">{{t 'backup'}}</a>
</div> </div>
<div class="actions-group"> <div class="actions-group">

View file

@ -1,9 +1,8 @@
<div class="btn-breadcrumb"> <div class="btn-breadcrumb">
<a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a> <a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/backup" class="btn btn-default">{{t 'backup'}}</a> <a href="#/backup">{{t 'backup'}}</a>
<a href="#/backup/{{storage.id}}" class="btn btn-default">{{storage.name}}</a> <a href="#/backup/{{storage.id}}">{{storage.name}}</a>
<a href="#/backup/{{storage.id}}/create" class="btn btn-default">{{t 'backup_create'}}</a> <a href="#/backup/{{storage.id}}/create">{{t 'backup_create'}}</a>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
@ -12,14 +11,14 @@
<div class="list-group"> <div class="list-group">
{{#each hooks}} {{#each hooks}}
<label for="{{@key}}" class="list-group-item"> <label for="{{@key}}" class="list-group-item">
<span class="pull-right"><input type="checkbox" id="{{@key}}" name="hooks" value="{{value}}" checked></span> <input type="checkbox" id="{{@key}}" name="hooks" value="{{value}}" checked class="pull-right">
<h2 class="list-group-item-heading">{{name}}</h2> <h2 class="list-group-item-heading">{{name}}</h2>
<p class="list-group-item-text">{{description}}</p> <p class="list-group-item-text">{{description}}</p>
</label> </label>
{{/each}} {{/each}}
{{#each apps}} {{#each apps}}
<label for="{{id}}" class="list-group-item"> <label for="{{id}}" class="list-group-item">
<span class="pull-right"><input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked></span> <input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked class="pull-right">
<h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2> <h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2>
</label> </label>
{{/each}} {{/each}}

View file

@ -1,41 +1,62 @@
<div class="btn-breadcrumb"> <div class="btn-breadcrumb">
<a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a> <a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/backup" class="btn btn-default">{{t 'backup'}}</a> <a href="#/backup">{{t 'backup'}}</a>
<a href="#/backup/{{storage.id}}" class="btn btn-default">{{storage.name}}</a> <a href="#/backup/{{storage.id}}">{{storage.name}}</a>
<a href="#/backup/{{storage.id}}/{{name}}" class="btn btn-default">{{name}}</a> <a href="#/backup/{{storage.id}}/{{name}}">{{name}}</a>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-info-circle"></span> {{t 'infos'}}</h2>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt>{{t 'id'}}</dt><dd>{{ name }}</dd>
<dt>{{t 'created_at'}}</dt><dd>{{ created_at }}</dd>
<dt>{{t 'size'}}</dt><dd>{{ humanSize size}}</dd>
<dt>{{t 'path'}}</dt><dd>{{ path }}</dd>
</dl>
</div>
</div>
<form action="#/backup/{{storage.id}}/{{name}}/restore" method="POST" class="form-horizontal"> <form action="#/backup/{{storage.id}}/{{name}}/restore" method="POST" class="form-horizontal">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-archive"></span>{{t 'backup_content'}}</h2>
</div>
{{#if items}}
<div class="list-group"> <div class="list-group">
{{#each hooks}} {{#each hooks}}
<label for="{{@key}}" class="list-group-item"> <label for="{{@key}}" class="list-group-item">
<span class="pull-right"><input type="checkbox" id="{{@key}}" name="hooks" value="{{value}}" checked></span> <input type="checkbox" id="{{@key}}" name="hooks" value="{{value}}" checked class="pull-right">
<h2 class="list-group-item-heading">{{name}}</h2> <h2 class="list-group-item-heading">{{name}}</h2>
<p class="list-group-item-text">{{description}}</p> <p class="list-group-item-text">{{description}}</p>
</label> </label>
{{/each}} {{/each}}
{{#each apps}} {{#each apps}}
<label for="{{id}}" class="list-group-item"> <label for="{{id}}" class="list-group-item">
<span class="pull-right"><input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked></span> <input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked class="pull-right">
<h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2> <h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2>
</label> </label>
{{/each}} {{/each}}
{{^items}} <div class="list-group-item clearfix">
<span class="pull-right ">
<input type="submit" class="btn btn-success slide back" value="{{t 'restore'}}" />
</span>
</div>
</div>
{{else}}
<div class="panel-body">
<div class="alert alert-warning"> <div class="alert alert-warning">
<span class="fa-exclamation-triangle"></span> <span class="fa-exclamation-triangle"></span>
{{t 'archive_empty'}} {{t 'archive_empty'}}
</div> </div>
{{/items}}
</div> </div>
{{#if items}}
<span class="pull-right">
<input type="submit" class="btn btn-danger slide back" value="{{t 'restore'}}" />
</span>
{{/if}} {{/if}}
</div>
</form> </form>
<div class="separator"></div> <div class="separator"></div>
@ -57,7 +78,7 @@
<div class="container"> <div class="container">
<p>{{t 'backup_archive_delete'}}</p> <p>{{t 'backup_archive_delete'}}</p>
<a href="#/backup/{{storage.id}}/{{name}}/delete" class="btn btn-danger slide"> <a href="#/backup/{{storage.id}}/{{name}}/delete" class="btn btn-danger slide">
<span class="fa-trash"></span> {{t 'delete'}} <span class="fa-trash-o"></span> {{t 'delete'}}
</a> </a>
</div> </div>
{{#if other_storages}} {{#if other_storages}}

View file

@ -1,9 +1,7 @@
<div class="btn-breadcrumb"> <div class="btn-breadcrumb">
<a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a> <a href="#/"><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/backup" class="btn btn-default">{{t 'backup'}}</a> <a href="#/backup">{{t 'backup'}}</a>
<a href="#/backup/{{storage.id}}" class="btn btn-default">{{storage.name}}</a> <a href="#/backup/{{storage.id}}">{{storage.name}}</a>
</div> </div>
<div class="actions-group"> <div class="actions-group">