2
0
Эх сурвалжийг харах

Merge branch 'feat/transplant-tabs-to-modal-for-master-merge' into add-pagination-for-displaying-attachment-data

zahmis 5 жил өмнө
parent
commit
cea5ea78ac

+ 3 - 0
src/client/js/components/Page/PageManagement.jsx

@@ -98,6 +98,9 @@ const PageManagement = (props) => {
         <button className="dropdown-item" type="button" onClick={openPageDuplicateModalHandler}>
           <i className="icon-fw icon-docs"></i> { t('Duplicate') }
         </button>
+        <button className="dropdown-item toggle-presentation" type="button" href="?presentation=1">
+          <i className="icon-film icon-fw"></i><span className="d-none d-sm-inline">{ t('Presentation Mode') }</span>
+        </button>
         <button type="button" className="dropdown-item" onClick={() => { exportPageHandler('md') }}>
           <i className="icon-fw icon-cloud-download"></i>{t('export_bulk.export_page_markdown')}
         </button>

+ 1 - 8
src/client/js/components/PageTimeline.jsx

@@ -23,7 +23,7 @@ class PageTimeline extends React.Component {
       activePage: 1,
       totalPages: 0,
       limit: appContainer.getConfig().recentCreatedLimit,
-      isEnabled: appContainer.getConfig().isEnabledTimeline,
+
       // TODO: remove after when timeline is implemented with React and inject data with props
       pages: this.props.pages,
     };
@@ -51,9 +51,6 @@ class PageTimeline extends React.Component {
   }
 
   componentWillMount() {
-    if (!this.state.isEnabled) {
-      return;
-    }
     const { appContainer } = this.props;
 
     // initialize GrowiRenderer
@@ -62,10 +59,6 @@ class PageTimeline extends React.Component {
   }
 
   render() {
-    if (!this.state.isEnabled) {
-      return <React.Fragment></React.Fragment>;
-    }
-
     const { pages } = this.state;
 
     if (pages == null) {

+ 0 - 9
src/server/views/widget/page_tabs.html

@@ -47,15 +47,6 @@
   {# to place right side #}
   <div class="mr-auto"></div>
 
-  <!-- presentation -->
-  {% if not page.isTopPage() %}
-    <li class="nav-item d-edit-none">
-      <a href="?presentation=1" class="nav-link toggle-presentation">
-        <i class="icon-film icon-fw"></i><span class="d-none d-sm-inline">{{ t('Presentation Mode') }}</span>
-      </a>
-    </li>
-  {% endif %}
-
   <!-- revision-history -->
   <li class="nav-item d-edit-none">
     <a class="nav-link" href="#revision-history" role="tab" data-toggle="tab">