mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-16 20:32:21 +01:00
123 lines
6.8 KiB
HTML
123 lines
6.8 KiB
HTML
<section class="container" ng-controller="AdminMessageController as vm" ng-init="vm.getAdminMessages();">
|
|
<div class="row margin-top-50">
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<div class="margin-bottom-20">
|
|
<h4>{{'ADMIN_MESSAGES_SEND' | translate}}</h4>
|
|
<li class="status-divider"></li>
|
|
</div>
|
|
|
|
<div class="margin-bottom-20">
|
|
<form name="vm.messageForm" ng-submit="vm.sendMessage(vm.messageForm.$valid)" novalidate autocomplete="off">
|
|
<dl class="dl-horizontal">
|
|
<div class="margin-bottom-10 form-group">
|
|
<dt class="h-line">{{ 'MESSAGES_FIELD.TYPE' | translate}}</dt>
|
|
<dd class="h-line">
|
|
<select class="form-control" ng-model="vm.messageType">
|
|
<option ng-repeat="t in vm.messageConfig.type.value" value="{{t.value}}">{{'MESSAGE_TYPE_'+t.name | translate}}
|
|
</option>
|
|
</select>
|
|
</dd>
|
|
</div>
|
|
|
|
<div class="margin-bottom-10 form-group" show-errors>
|
|
<dt class="h-line">{{ 'MESSAGES_FIELD.TITLE' | translate}}</dt>
|
|
<dd class="h-line">
|
|
<input type="text" class="form-control" id="title" name="title"
|
|
ng-model="vm.messageFields.title" required>
|
|
|
|
<div ng-messages="vm.messageForm.title.$error" role="alert">
|
|
<p class="help-block error-text" ng-message="required">{{ 'MESSAGES_FIELD.TT_REQUIRED' | translate}}</p>
|
|
</div>
|
|
</dd>
|
|
</div>
|
|
|
|
<div class="margin-bottom-10 form-group" show-errors>
|
|
<dt class="h-line">{{ 'MESSAGES_FIELD.CONTENT' | translate}}</dt>
|
|
<dd class="h-line">
|
|
<textarea class="form-control message-textarea" id="content" name="content"
|
|
ng-model="vm.messageFields.content" required></textarea>
|
|
|
|
<div ng-messages="vm.messageForm.content.$error" role="alert">
|
|
<p class="help-block error-text" ng-message="required">{{ 'MESSAGES_FIELD.CT_REQUIRED' | translate}}</p>
|
|
</div>
|
|
|
|
<div style="display: table;">
|
|
<a class="message-extra" href="https://guides.github.com/features/mastering-markdown/" target="_blank"
|
|
data-ga-click="Markdown Toolbar, click, help">
|
|
<svg aria-hidden="true" height="16" version="1.1"
|
|
viewBox="0 0 16 16" width="16">
|
|
<path fill-rule="evenodd"
|
|
d="M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"/>
|
|
</svg>
|
|
{{ 'MARKDOWN_LINK' | translate }}
|
|
</a>
|
|
</div>
|
|
</dd>
|
|
</div>
|
|
|
|
<div>
|
|
<dt class="h-line"></dt>
|
|
<dd class="h-line">
|
|
<button type="submit" class="btn btn-success btn-width-100">{{ 'MESSAGES_SEND_BUTTON' | translate }}</button>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row margin-top-50 margin-bottom-50">
|
|
<div class="col-md-12">
|
|
<div class="table-responsive" ng-if="vm.adminMessages.length">
|
|
<table class="table table-hover tb-v-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ 'MESSAGES_FIELD.LIST_TITLE_CONTENT' | translate}}</th>
|
|
<th class="text-center">{{ 'MESSAGES_FIELD.LIST_READERS' | translate}}</th>
|
|
<th class="text-center">{{ 'MESSAGES_FIELD.LIST_TYPE' | translate}}</th>
|
|
<th class="text-center">{{ 'MESSAGES_FIELD.LIST_SENDAT' | translate}}</th>
|
|
<th class="text-center">{{ 'MESSAGES_FIELD.LIST_SELECT' | translate}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="message-item" ng-repeat="m in vm.adminMessages">
|
|
<td>
|
|
<h5 ng-bind="m.title"></h5>
|
|
|
|
<p class="message-content" ng-bind-html="vm.getContentMarked(m);"></p>
|
|
|
|
<p class="message-info">
|
|
<span user-info="m.from_user"
|
|
info-name></span> {{'MESSAGES_FIELD.INFO_SEND_AT' | translate}} {{m.createdat | date: 'yyyy-MM-dd HH:mm:ss' }}
|
|
</p>
|
|
</td>
|
|
<td class="td-v-middle text-center">
|
|
<span ng-class="vm.getMessageClass(m);">{{m._readers.length}}</span>
|
|
</td>
|
|
<td class="td-v-middle text-center">
|
|
<span ng-class="vm.getMessageClass(m);">{{'MESSAGE_TYPE_' + m.type.toUpperCase() | translate}}</span>
|
|
</td>
|
|
<td class="td-v-middle text-center">
|
|
<span ng-class="vm.getMessageClass(m);">{{m.createdat | life}}</span>
|
|
</td>
|
|
<td class="td-v-middle text-center">
|
|
<input type="checkbox" class="tcheckbox" ng-model="vm.selected[m._id]"
|
|
id="checkbox_{{m._id}}">
|
|
</label>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="margin-top-20" ng-if="vm.adminMessages.length">
|
|
<div class="pull-right margin-top-20">
|
|
<button class="btn btn-success btn-width-100" ng-click="vm.deleteSelected()">{{ 'BUTTON_MESSAGE_DELETE' | translate }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|