itizawa 6 лет назад
Родитель
Сommit
2948e5c19e

+ 3 - 0
resource/locales/en-US/translation.json

@@ -275,6 +275,9 @@
     "recursively": "Delete children of under <code>%s</code> recursively.",
     "completely": "Delete completely instead of putting it into trash."
   },
+  "modal_empty":{
+    "empty_the_trash": "Empty The Trash"
+  },
   "modal_duplicate": {
     "label": {
       "Duplicate page": "Duplicate page",

+ 3 - 0
resource/locales/ja/translation.json

@@ -273,6 +273,9 @@
     "recursively": "<code>%s</code> 配下のページも削除します",
     "completely": "ゴミ箱を経由せず、完全に削除します"
   },
+  "modal_empty":{
+    "empty_the_trash": "ゴミ箱を空にする"
+  },
   "modal_duplicate": {
     "label": {
       "Duplicate page": "ページを複製する",

+ 2 - 2
src/server/views/modal/empty_trash.html

@@ -7,7 +7,7 @@
       <div class="modal-header bg-danger">
         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
         <div class="modal-title">
-          <i class="icon-fw icon-trash"></i> ゴミ箱を空にします
+          <i class="icon-fw icon-trash"></i>  {{ t('modal_empty.empty_the_trash') }}
         </div>
       </div>
       <div class="modal-body">
@@ -34,7 +34,7 @@
             <input type="hidden" name="_csrf" value="{{ csrf() }}">
             <button type="submit" class="m-l-10 btn btn-danger delete-button">
               <i class="icon-trash" aria-hidden="true"></i>
-              {{ t('Delete') }}
+              Empty
             </button>
           </div>
         </div>

+ 2 - 2
src/server/views/widget/page_alerts.html

@@ -89,9 +89,9 @@
         {% endif %}
       </div>
       <ul class="list-inline">
-        {% if user and user.admin %}
+        {% if user and user.admin and not page.isDeleted() %}
         <li>
-          <button href="#" class="btn btn-danger btn-rounded btn-sm" data-target="#emptyTrash" data-toggle="modal"><i class="icon-trash" aria-hidden="true"></i>ゴミ箱を空にする</button>
+          <button href="#" class="btn btn-danger btn-rounded btn-sm" data-target="#emptyTrash" data-toggle="modal"><i class="icon-trash" aria-hidden="true"></i>{{ t('modal_empty.empty_the_trash') }}</button>
         </li>
         {% endif %}
         {% if page.isDeleted() and user %}