Просмотр исходного кода

Merge branch 'master' into feat/importer

yusuketk 7 лет назад
Родитель
Сommit
decc7492f3

+ 3 - 1
CHANGES.md

@@ -7,7 +7,9 @@ CHANGES
 
 
 ## 3.1.14-RC
 ## 3.1.14-RC
 
 
-* 
+* Improvement: Show help for header search box
+* Fix: Couldn't delete page completely from search result page
+* Fix: Tabs of trash page are broken
 
 
 ## 3.1.13
 ## 3.1.13
 
 

+ 3 - 3
lib/util/slack.js

@@ -79,7 +79,7 @@ module.exports = function(crowi) {
       var value = line.value.replace(/\r\n|\r/g, '\n');
       var value = line.value.replace(/\r\n|\r/g, '\n');
       /* eslint-enable */
       /* eslint-enable */
       if (line.added) {
       if (line.added) {
-        diffText += `:pencil2: ...\n${line.value}`;
+        diffText += `${line.value} ... :lower_left_fountain_pen:`;
       }
       }
       else if (line.removed) {
       else if (line.removed) {
         // diffText += '-' + line.value.replace(/(.+)?\n/g, '- $1\n');
         // diffText += '-' + line.value.replace(/(.+)?\n/g, '- $1\n');
@@ -179,10 +179,10 @@ module.exports = function(crowi) {
 
 
     const pageUrl = `<${url}${path}|${path}>`;
     const pageUrl = `<${url}${path}|${path}>`;
     if (updateType == 'create') {
     if (updateType == 'create') {
-      text = `:white_check_mark: ${user.username} created a new page! ${pageUrl}`;
+      text = `:rocket: ${user.username} created a new page! ${pageUrl}`;
     }
     }
     else {
     else {
-      text = `:up: ${user.username} updated ${pageUrl}`;
+      text = `:heavy_check_mark: ${user.username} updated ${pageUrl}`;
     }
     }
 
 
     return text;
     return text;

+ 17 - 17
lib/views/admin/global-notification-detail.html

@@ -87,46 +87,46 @@
             <fieldset class="col-sm-offset-1 col-sm-5">
             <fieldset class="col-sm-offset-1 col-sm-5">
               <div class="form-group">
               <div class="form-group">
                 <h3>{{ t('notification_setting.trigger_events') }}</h3>
                 <h3>{{ t('notification_setting.trigger_events') }}</h3>
-                <div class="checkbox checkbox-info">
+                <div class="checkbox checkbox-inverse">
                   <input type="checkbox" id="trigger-event-pageCreate" name="notificationGlobal[triggerEvent:pageCreate]" value="pageCreate"
                   <input type="checkbox" id="trigger-event-pageCreate" name="notificationGlobal[triggerEvent:pageCreate]" value="pageCreate"
                     {% if setting && (setting.triggerEvents.indexOf('pageCreate') != -1) %}checked{% endif %} />
                     {% if setting && (setting.triggerEvents.indexOf('pageCreate') != -1) %}checked{% endif %} />
                   <label for="trigger-event-pageCreate">
                   <label for="trigger-event-pageCreate">
-                    <span class="label label-info"><i class="icon-doc"></i> CREATE</span> - {{ t('notification_setting.event_pageCreate') }}
+                    <span class="label label-success"><i class="icon-doc"></i> CREATE</span> - {{ t('notification_setting.event_pageCreate') }}
                   </label>
                   </label>
                 </div>
                 </div>
-                <div class="checkbox checkbox-info">
+                <div class="checkbox checkbox-inverse">
                   <input type="checkbox" id="trigger-event-pageEdit" name="notificationGlobal[triggerEvent:pageEdit]" value="pageEdit"
                   <input type="checkbox" id="trigger-event-pageEdit" name="notificationGlobal[triggerEvent:pageEdit]" value="pageEdit"
                     {% if setting && (setting.triggerEvents.indexOf('pageEdit') != -1) %}checked{% endif %} />
                     {% if setting && (setting.triggerEvents.indexOf('pageEdit') != -1) %}checked{% endif %} />
                   <label for="trigger-event-pageEdit">
                   <label for="trigger-event-pageEdit">
-                    <span class="label label-info"><i class="icon-doc"></i> EDIT</span> - {{ t('notification_setting.event_pageEdit') }}
+                    <span class="label label-warning"><i class="icon-pencil"></i> EDIT</span> - {{ t('notification_setting.event_pageEdit') }}
                   </label>
                   </label>
                 </div>
                 </div>
-                <div class="checkbox checkbox-info">
-                  <input type="checkbox" id="trigger-event-pageDelete" name="notificationGlobal[triggerEvent:pageDelete]" value="pageDelete"
-                    {% if setting && (setting.triggerEvents.indexOf('pageDelete') != -1) %}checked{% endif %} />
-                  <label for="trigger-event-pageDelete">
-                    <span class="label label-info"><i class="icon-doc"></i> DELETE</span> - {{ t('notification_setting.event_pageDelete') }}
-                  </label>
-                </div>
-                <div class="checkbox checkbox-info">
+                <div class="checkbox checkbox-inverse">
                   <input type="checkbox" id="trigger-event-pageMove" name="notificationGlobal[triggerEvent:pageMove]" value="pageMove"
                   <input type="checkbox" id="trigger-event-pageMove" name="notificationGlobal[triggerEvent:pageMove]" value="pageMove"
                     {% if setting && (setting.triggerEvents.indexOf('pageMove') != -1) %}checked{% endif %} />
                     {% if setting && (setting.triggerEvents.indexOf('pageMove') != -1) %}checked{% endif %} />
                   <label for="trigger-event-pageMove">
                   <label for="trigger-event-pageMove">
-                    <span class="label label-info"><i class="icon-doc"></i> MOVE</span> - {{ t('notification_setting.event_pageMove') }}
+                    <span class="label label-warning"><i class="icon-action-redo"></i> MOVE</span> - {{ t('notification_setting.event_pageMove') }}
+                  </label>
+                </div>
+                <div class="checkbox checkbox-inverse">
+                  <input type="checkbox" id="trigger-event-pageDelete" name="notificationGlobal[triggerEvent:pageDelete]" value="pageDelete"
+                    {% if setting && (setting.triggerEvents.indexOf('pageDelete') != -1) %}checked{% endif %} />
+                  <label for="trigger-event-pageDelete">
+                    <span class="label label-danger"><i class="icon-fire"></i> DELETE</span> - {{ t('notification_setting.event_pageDelete') }}
                   </label>
                   </label>
                 </div>
                 </div>
-                <div class="checkbox checkbox-info">
+                <div class="checkbox checkbox-inverse">
                     <input type="checkbox" id="trigger-event-pageLike" name="notificationGlobal[triggerEvent:pageLike]" value="pageLike"
                     <input type="checkbox" id="trigger-event-pageLike" name="notificationGlobal[triggerEvent:pageLike]" value="pageLike"
                       {% if setting && (setting.triggerEvents.indexOf('pageLike') != -1) %}checked{% endif %} />
                       {% if setting && (setting.triggerEvents.indexOf('pageLike') != -1) %}checked{% endif %} />
                     <label for="trigger-event-pageLike">
                     <label for="trigger-event-pageLike">
-                      <span class="label label-info"><i class="icon-doc"></i> LIKE</span> - {{ t('notification_setting.event_pageLike') }}
+                      <span class="label label-info"><i class="icon-like"></i> LIKE</span> - {{ t('notification_setting.event_pageLike') }}
                     </label>
                     </label>
                   </div>
                   </div>
-                <div class="checkbox checkbox-info">
+                <div class="checkbox checkbox-inverse">
                   <input type="checkbox" id="trigger-event-comment" name="notificationGlobal[triggerEvent:comment]" value="comment"
                   <input type="checkbox" id="trigger-event-comment" name="notificationGlobal[triggerEvent:comment]" value="comment"
                     {% if setting && (setting.triggerEvents.indexOf('comment') != -1) %}checked{% endif %} />
                     {% if setting && (setting.triggerEvents.indexOf('comment') != -1) %}checked{% endif %} />
                   <label for="trigger-event-comment">
                   <label for="trigger-event-comment">
-                    <span class="label label-info"><i class="icon-fw icon-bubbles"></i> POST</span> - {{ t('notification_setting.event_comment') }}
+                    <span class="label label-default"><i class="icon-fw icon-bubble"></i> POST</span> - {{ t('notification_setting.event_comment') }}
                   </label>
                   </label>
                 </div>
                 </div>
               </div>
               </div>

+ 6 - 6
lib/views/admin/global-notification.html

@@ -4,12 +4,12 @@
 <h2>{{ t('notification_setting.notification_list') }}</h2>
 <h2>{{ t('notification_setting.notification_list') }}</h2>
 
 
 {% set tags = {
 {% set tags = {
-  pageCreate: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Create"><i class="icon-doc"></i> CREATE</span>',
-  pageEdit: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Edit"><i class="icon-doc"></i> EDIT</span>',
-  pageDelete: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Delte"><i class="icon-doc"></i> DELETE</span>',
-  pageMove: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Move"><i class="icon-doc"></i> MOVE</span>',
-  pageLike: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Like"><i class="icon-doc"></i> LIKE</span>',
-  comment: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="New Comment"><i class="icon-fw icon-bubbles"></i> POST</span>'
+  pageCreate: '<span class="label label-success" data-toggle="tooltip" data-placement="top" title="Page Create"><i class="icon-doc"></i> CREATE</span>',
+  pageEdit: '<span class="label label-warning" data-toggle="tooltip" data-placement="top" title="Page Edit"><i class="icon-pencil"></i> EDIT</span>',
+  pageMove: '<span class="label label-warning" data-toggle="tooltip" data-placement="top" title="Page Move"><i class="icon-action-redo"></i> MOVE</span>',
+  pageDelete: '<span class="label label-danger" data-toggle="tooltip" data-placement="top" title="Page Delte"><i class="icon-fire"></i> DELETE</span>',
+  pageLike: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Like"><i class="icon-like"></i> LIKE</span>',
+  comment: '<span class="label label-default" data-toggle="tooltip" data-placement="top" title="New Comment"><i class="icon-fw icon-bubble"></i> POST</span>'
 } %}
 } %}
 
 
 <table class="table table-bordered">
 <table class="table table-bordered">

+ 1 - 0
lib/views/widget/page_tabs.html

@@ -58,6 +58,7 @@
         {% endif %}
         {% endif %}
       </ul>
       </ul>
     </li>
     </li>
+    {% endif %}
   {% endif %}
   {% endif %}
 
 
   <li class="nav-main-right-tab pull-right">
   <li class="nav-main-right-tab pull-right">

+ 21 - 17
resource/js/components/HeaderSearchBox/SearchForm.js

@@ -46,23 +46,27 @@ export default class SearchForm extends React.Component {
   }
   }
 
 
   getHelpElement() {
   getHelpElement() {
-    return <table className="table m-1">
-            <caption className="text-left text-primary p-2 mb-2">
-              <h5 className="m-1"><i className="icon-magnifier pr-2 mb-2"/>Search Help</h5>
-            </caption>
-            <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>keyword</code></td>
-              <th className="mr-2"><h6 className="pr-2 m-0 pt-1">記事名 or 本文に<samp>"keyword"</samp>を含む</h6></th>
-            </tr>
-             <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>a b</code></td>
-              <th><h6 className="m-0 pt-1">文字列<samp>"a"</samp>と<samp>"b"</samp>を含む (スペース区切り)</h6></th>
-            </tr>
-            <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>-keyword</code></td>
-              <th><h6 className="m-0 pt-1">文字列<samp>"keyword"</samp>を含まない</h6></th>
-            </tr>
-          </table>;
+    return (
+      <table className="table m-1 search-help">
+        <caption className="text-left text-primary p-2 mb-2">
+          <h5 className="m-1"><i className="icon-magnifier pr-2 mb-2"/>Search Help</h5>
+        </caption>
+        <tbody>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>keyword</code></td>
+            <th className="mr-2"><h6 className="pr-2 m-0 pt-1">記事名 or 本文に<samp>"keyword"</samp>を含む</h6></th>
+          </tr>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>a b</code></td>
+            <th><h6 className="m-0 pt-1">文字列<samp>"a"</samp>と<samp>"b"</samp>を含む (スペース区切り)</h6></th>
+          </tr>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>-keyword</code></td>
+            <th><h6 className="m-0 pt-1">文字列<samp>"keyword"</samp>を含まない</h6></th>
+          </tr>
+        </tbody>
+      </table>
+    );
   }
   }
 
 
   onSubmit(query) {
   onSubmit(query) {

+ 2 - 2
resource/js/components/SearchPage/DeletePageListModal.js

@@ -43,8 +43,8 @@ export default class DeletePageListModal extends React.Component {
         <Modal.Footer>
         <Modal.Footer>
           <div className="d-flex justify-content-between">
           <div className="d-flex justify-content-between">
             <span className="text-danger">{this.props.errorMessage}</span>
             <span className="text-danger">{this.props.errorMessage}</span>
-            <span className="d-flex">
-              <Checkbox onClick={this.props.toggleDeleteCompletely}>Delete completely</Checkbox>
+            <span className="d-flex align-items-center">
+              <Checkbox className="text-danger" onClick={this.props.toggleDeleteCompletely} inline={true}>Delete completely</Checkbox>
               <span className="m-l-10">
               <span className="m-l-10">
                 <Button onClick={this.props.confirmedToDelete}><i className="icon-trash"></i>Delete</Button>
                 <Button onClick={this.props.confirmedToDelete}><i className="icon-trash"></i>Delete</Button>
               </span>
               </span>

+ 6 - 0
resource/styles/scss/_search.scss

@@ -92,6 +92,12 @@
       width: 300px;
       width: 300px;
     }
     }
   }
   }
+
+  table.search-help {
+    th, td {
+      border: none;
+    }
+  }
 }
 }
 .search-sidebar {
 .search-sidebar {
   .search-form, .form-group, .rbt-input.form-control, .input-group {
   .search-form, .form-group, .rbt-input.form-control, .input-group {

+ 5 - 5
resource/styles/scss/theme/_override-agileadmin.scss

@@ -76,33 +76,33 @@ a {
  * Alert
  * Alert
  */
  */
 .alert {
 .alert {
-  a {
+  a:not(.btn) {
     color: white;
     color: white;
   }
   }
 
 
   &.alert-info {
   &.alert-info {
-    a {
+    a:not(.btn) {
       &:hover, &:focus {
       &:hover, &:focus {
         color: lighten($info, 40%);
         color: lighten($info, 40%);
       }
       }
     }
     }
   }
   }
   &.alert-success {
   &.alert-success {
-    a {
+    a:not(.btn) {
       &:hover, &:focus {
       &:hover, &:focus {
         color: lighten($success, 40%);
         color: lighten($success, 40%);
       }
       }
     }
     }
   }
   }
   &.alert-warning {
   &.alert-warning {
-    a {
+    a:not(.btn) {
       &:hover, &:focus {
       &:hover, &:focus {
         color: lighten($warning, 30%);
         color: lighten($warning, 30%);
       }
       }
     }
     }
   }
   }
   &.alert-danger {
   &.alert-danger {
-    a {
+    a:not(.btn) {
       &:hover, &:focus {
       &:hover, &:focus {
         color: lighten($danger, 30%);
         color: lighten($danger, 30%);
       }
       }