#185: prepare home design for widgets

This commit is contained in:
Benjamin Gamard 2018-03-05 15:44:14 +01:00
parent 2771e56357
commit 0b14ab5032
3 changed files with 98 additions and 56 deletions

View File

@ -8,47 +8,49 @@
</a> </a>
</td> </td>
<td> <td>
{{ 'directive.auditlog.' + log.class | translate }} <span ng-class="{ 'text-danger': log.type == 'DELETE', 'text-info': log.type == 'UPDATE', 'text-success': log.type == 'CREATE' }">
<span ng-switch="log.type"> {{ 'directive.auditlog.' + log.class | translate }}
<span ng-switch-when="CREATE">{{ 'directive.auditlog.log_created' | translate }}</span> <span ng-switch="log.type">
<span ng-switch-when="UPDATE">{{ 'directive.auditlog.log_updated' | translate }}</span> <span ng-switch-when="CREATE">{{ 'directive.auditlog.log_created' | translate }}</span>
<span ng-switch-when="DELETE">{{ 'directive.auditlog.log_deleted' | translate }}</span> <span ng-switch-when="UPDATE">{{ 'directive.auditlog.log_updated' | translate }}</span>
</span> <span ng-switch-when="DELETE">{{ 'directive.auditlog.log_deleted' | translate }}</span>
</span>
:
</span>
<span ng-switch="log.class"> <span ng-switch="log.class">
: <span ng-switch-when="Document">
<span ng-switch-when="Document"> <a ng-href="#/document/view/{{ log.target }}">{{ log.message }}</a>
<a ng-href="#/document/view/{{ log.target }}">{{ log.message }}</a> </span>
</span> <span ng-switch-when="File" ng-init="hasDocument = log.message.substring(0, 36).trim().length > 0">
<span ng-switch-when="File" ng-init="hasDocument = log.message.substring(0, 36).trim().length > 0"> <a ng-if="log.message" ng-href="#/document/{{ hasDocument ? 'view/' + log.message.substring(0, 36) + '/content/' : '' }}file/{{ log.target }}">
<a ng-if="log.message" ng-href="#/document/{{ hasDocument ? 'view/' + log.message.substring(0, 36) + '/content/' : '' }}file/{{ log.target }}"> <span ng-if="log.message.length > 36">{{ log.message | limitTo: 1000 : 36 }}</span>
<span ng-if="log.message.length > 36">{{ log.message | limitTo: 1000 : 36 }}</span> <span ng-if="log.message.length == 36">{{ 'open' | translate }}</span>
<span ng-if="log.message.length == 36">{{ 'open' | translate }}</span> </a>
</a> <a ng-if="!log.message" ng-href="#/document/file/{{ log.target }}">{{ 'open' | translate }}</a>
<a ng-if="!log.message" ng-href="#/document/file/{{ log.target }}">{{ 'open' | translate }}</a> </span>
</span> <span ng-switch-when="Comment">
<span ng-switch-when="Comment"> <a ng-href="#/document/view/{{ log.message }}">{{ 'see' | translate }}</a>
<a ng-href="#/document/view/{{ log.message }}">{{ 'see' | translate }}</a> </span>
</span> <span ng-switch-when="Acl">
<span ng-switch-when="Acl"> {{ 'acl.' + log.message | translate }}
{{ 'acl.' + log.message | translate }} </span>
</span> <span ng-switch-when="Tag">
<span ng-switch-when="Tag"> <a href="#/tag">{{ log.message }}</a>
<a href="#/tag">{{ log.message }}</a> </span>
</span> <span ng-switch-when="User">
<span ng-switch-when="User"> <a href="#/user/{{ log.message }}">{{ log.message }}</a>
<a href="#/user/{{ log.message }}">{{ log.message }}</a> </span>
</span> <span ng-switch-when="Group">
<span ng-switch-when="Group"> <a href="#/group/{{ log.message }}">{{ log.message }}</a>
<a href="#/group/{{ log.message }}">{{ log.message }}</a> </span>
</span> <span ng-switch-when="RouteModel">
<span ng-switch-when="RouteModel"> <a href="#/settings/workflow/edit/{{ log.target }}">{{ log.message }}</a>
<a href="#/settings/workflow/edit/{{ log.target }}">{{ log.message }}</a> </span>
</span> <span ng-switch-when="Route">
<span ng-switch-when="Route"> <a ng-href="#/document/view/{{ log.message }}">{{ 'open' | translate }}</a>
<a ng-href="#/document/view/{{ log.message }}">{{ 'open' | translate }}</a> </span>
</span> </span>
</span>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -1,8 +1,6 @@
<img src="img/loader.gif" ng-show="!logs" /> <div class="well well-3d" style="background-color: #f6f9fc">
<h3 class="well-3d-header text-muted">
<div> {{ 'document.default.quick_upload' | translate }}
<h3 class="page-header">
<span class="glyphicon glyphicon-cloud-upload"></span> {{ 'document.default.quick_upload' | translate }}
</h3> </h3>
<div class="row upload-zone" <div class="row upload-zone"
ngf-drop="fileDropped($files)" ngf-drop="fileDropped($files)"
@ -36,7 +34,7 @@
</div> </div>
</div> </div>
<p class="text-center well-lg" ng-if="files.length == 0"> <p class="text-center well-lg text-muted" ng-if="files.length == 0">
<span class="glyphicon glyphicon-move"></span> <span class="glyphicon glyphicon-move"></span>
{{ 'document.default.drop_zone' | translate }} {{ 'document.default.drop_zone' | translate }}
</p> </p>
@ -50,7 +48,7 @@
</button> </button>
<button ng-show="checkedFiles().length == 0" <button ng-show="checkedFiles().length == 0"
class="btn btn-primary" class="btn btn-default"
ngf-select ngf-select
ngf-change="fileDropped($files, $event)" ngf-change="fileDropped($files, $event)"
input-file-multiple="multiple" input-file-multiple="multiple"
@ -58,17 +56,34 @@
{{ 'document.default.add_files' | translate }} {{ 'document.default.add_files' | translate }}
</button> </button>
</p> </p>
<div ui-view="file"></div>
<div ng-show="logs.length > 0">
<h3 class="page-header">
<span class="glyphicon glyphicon-tasks"></span> {{ 'document.default.latest_activity' | translate }}
</h3>
<audit-log logs="logs" />
</div>
</div> </div>
<!--<div class="row widgets">
<div class="col-md-6">
<div class="well well-3d mr-10">
<h3 class="well-3d-header">Widget 1</h3>
</div>
</div>
<div class="col-md-6">
<div class="well well-3d ml-10">
<h3 class="well-3d-header">Widget 2</h3>
</div>
</div>
</div>-->
<div class="mb-19 text-center" ng-show="!logs">
<img src="img/loader.gif" />
</div>
<div class="well well-3d" ng-show="logs.length > 0">
<h3 class="well-3d-header text-muted">
{{ 'document.default.latest_activity' | translate }}
</h3>
<audit-log logs="logs" />
</div>
<div ui-view="file"></div>
<a href class="feedback" ng-click="openFeedback()"> <a href class="feedback" ng-click="openFeedback()">
{{ 'document.default.feedback' | translate }} {{ 'document.default.feedback' | translate }}
</a> </a>

View File

@ -533,6 +533,14 @@ input[readonly].share-link {
margin-bottom: 19px; margin-bottom: 19px;
} }
.ml-10 {
margin-left: 10px;
}
.mr-10 {
margin-right: 10px;
}
// BS customizations // BS customizations
.btn { .btn {
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
@ -575,6 +583,17 @@ input[readonly].share-link {
box-shadow: 0 7px 14px 0 rgba(50,50,93,.1), 0 3px 6px 0 rgba(0,0,0,.07); box-shadow: 0 7px 14px 0 rgba(50,50,93,.1), 0 3px 6px 0 rgba(0,0,0,.07);
background: none; background: none;
border-radius: 4px; border-radius: 4px;
.well-3d-header {
font-size: 20px;
font-weight: 400;
margin-top: 0;
margin-bottom: 19px;
}
table {
margin-bottom: 0;
}
} }
// Cards // Cards
@ -586,4 +605,10 @@ input[readonly].share-link {
border: 1px solid rgba(0,0,0,.125); border: 1px solid rgba(0,0,0,.125);
border-radius: .25em; border-radius: .25em;
padding: 1.25em; padding: 1.25em;
}
// Home widgets
.widgets .col-md-6 {
padding-left: 0;
padding-right: 0;
} }