|
@@ -16,14 +16,19 @@
|
|
|
Add
|
|
|
</a>
|
|
|
<form url="/api/proTextShortcut/create">
|
|
|
- <input type="hidden" name="proUid" value="{{$pro->uid}}">
|
|
|
+ @if($pro->pro_type !== 'ADMIN')
|
|
|
+ <input type="hidden" name="proUid" value="{{$pro->uid}}">
|
|
|
+ @else
|
|
|
+ <p><b>Add Global Shortcut</b></p>
|
|
|
+ @endif
|
|
|
<div class="mb-2">
|
|
|
<input type="text" class="form-control form-control-sm" name="shortcut"
|
|
|
placeholder="Shortcut *">
|
|
|
</div>
|
|
|
<div class="mb-2">
|
|
|
- <textarea type="text" rows="10" class="form-control form-control-sm" name="text"
|
|
|
- placeholder="Content *"></textarea>
|
|
|
+ <textarea type="text"
|
|
|
+ rows="10" class="form-control form-control-sm" name="text"
|
|
|
+ placeholder="Content *"></textarea>
|
|
|
</div>
|
|
|
<div class="form-group m-0">
|
|
|
<button submit class="btn btn-primary btn-sm mr-2">Submit</button>
|
|
@@ -33,22 +38,31 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="card-body p-0">
|
|
|
- <table class="table table-condensed p-0 m-0">
|
|
|
+ <table class="table table-condensed table-hover p-0 m-0">
|
|
|
<thead class="bg-light">
|
|
|
<tr>
|
|
|
- <th class="px-3 border-0 w-25">Shortcut</th>
|
|
|
+ <th class="px-3 border-0">Pro</th>
|
|
|
+ <th class="border-0 width-200px">Shortcut</th>
|
|
|
<th class="border-0">Text</th>
|
|
|
- <th class="border-0 w-25"> </th>
|
|
|
+ <th class="border-0 width-200px"> </th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
@foreach($myTextShortcuts as $textShortcut)
|
|
|
<tr>
|
|
|
- <td class="px-3">{{ $textShortcut->shortcut }}</td>
|
|
|
- <td><pre class="mb-0">{{ $textShortcut->text }}</pre></td>
|
|
|
+ <td class="px-3 text-nowrap">
|
|
|
+ @if($textShortcut->name_first || $textShortcut->name_last)
|
|
|
+ {{ $textShortcut->name_first ? $textShortcut->name_first : '' }}
|
|
|
+ {{ $textShortcut->name_last ? $textShortcut->name_last : '' }}
|
|
|
+ @else
|
|
|
+ <span class="text-secondary">(global)</span>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td>{{ $textShortcut->shortcut }}</td>
|
|
|
+ <td><pre class="max-width-700px my-0" style="white-space: break-spaces;">{{ $textShortcut->text }}</pre></td>
|
|
|
<td>
|
|
|
<div class="d-flex align-items-center">
|
|
|
- <div moe wide class="mr-3">
|
|
|
+ <div moe large relative class="mr-3">
|
|
|
<a start show>
|
|
|
<i class="fa fa-pencil-alt"></i>
|
|
|
</a>
|