### UI Changes If `SiteSetting.enable_bookmarks_with_reminders` is enabled: * Clicking "Bookmark" on a topic will create a new Bookmark record instead of a post + user action * Clicking "Clear Bookmarks" on a topic will delete all the new Bookmark records on a topic * The topic bookmark buttons control the post bookmark flags correctly and vice-versa Disabled selecting the "reminder type" for bookmarks in the UI because the backend functionality is not done yet (of sending users notifications etc.) ### Other Changes * Added delete bookmark route (but no UI yet) * Added a rake task to sync the old PostAction bookmarks to the new Bookmark table, which can be run as many times as we want for a site (it will not create duplicates).
52 lines
2.6 KiB
Handlebars
52 lines
2.6 KiB
Handlebars
{{#d-modal-body id="bookmark-reminder-modal"}}
|
|
{{#conditional-loading-spinner condition=loading}}
|
|
{{#if errorMessage}}
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div class='alert alert-error'>{{errorMessage}}</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="control-group">
|
|
<label class="control-label" for="name">
|
|
{{i18n 'post.bookmarks.name'}}
|
|
</label>
|
|
|
|
{{input value=name name="name" class="bookmark-name" enter=(action "saveAndClose") placeholder=(i18n "post.bookmarks.name_placeholder")}}
|
|
</div>
|
|
|
|
{{#if showBookmarkReminderControls}}
|
|
<div class="control-group">
|
|
<label class="control-label" for="set_reminder">
|
|
{{i18n 'post.bookmarks.set_reminder'}}
|
|
</label>
|
|
|
|
{{#if userHasTimezoneSet}}
|
|
{{#tap-tile-grid activeTile=selectedReminderType as |grid|}}
|
|
{{#if usingMobileDevice}}
|
|
<!-- {{tap-tile icon="desktop" text=(i18n "bookmarks.reminders.at_desktop") tileId=reminderTypes.AT_DESKTOP activeTile=grid.activeTile onChange=(action "selectReminderType")}} -->
|
|
{{/if}}
|
|
|
|
{{#if showLaterToday}}
|
|
{{tap-tile icon="far-moon" text=laterTodayFormatted tileId=reminderTypes.LATER_TODAY activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
|
{{/if}}
|
|
{{tap-tile icon="briefcase" text=nextBusinessDayFormatted tileId=reminderTypes.NEXT_BUSINESS_DAY activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
|
{{tap-tile icon="far-sun" text=tomorrowFormatted tileId=reminderTypes.TOMORROW activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
|
{{tap-tile icon="far-clock" text=nextWeekFormatted tileId=reminderTypes.NEXT_WEEK activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
|
{{tap-tile icon="far-calendar-plus" text=nextMonthFormatted tileId=reminderTypes.NEXT_MONTH activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
|
<!-- {{tap-tile icon="calendar-alt" text=(I18n "bookmarks.reminders.custom") tileId=reminderTypes.CUSTOM activeTile=grid.activeTile onChange=(action "selectReminderType")}} -->
|
|
{{/tap-tile-grid}}
|
|
{{else}}
|
|
<div class="alert alert-info">{{{i18n "bookmarks.no_timezone" basePath=basePath }}}</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="control-group">
|
|
{{d-button label="bookmarks.save" class="btn-primary" action=(action "saveAndClose")}}
|
|
{{d-modal-cancel close=(action "closeWithoutSavingBookmark")}}
|
|
</div>
|
|
{{/conditional-loading-spinner}}
|
|
{{/d-modal-body}}
|