• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguiwindowsc翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

コミットメタ情報

リビジョン399521c8ecc176ebad63f2697338963c139287b1 (tree)
日時2017-09-05 22:30:12
作者HMML <hmml3939@gmai...>
コミッターHMML

ログメッセージ

Add new draft button.

変更サマリ

差分

--- a/app/controllers/drafts_controller.rb
+++ b/app/controllers/drafts_controller.rb
@@ -18,7 +18,7 @@ class DraftsController < ApplicationController
1818 end
1919
2020 def new
21- if cookies[:draft_key].present?
21+ if cookies[:draft_key].present? && !%w(1 t).member?(params[:new])
2222 @draft = Draft.find_by(key: cookies[:draft_key])
2323 end
2424 @draft ||= Draft.create user: current_user
--- a/app/views/drafts/edit.html.haml
+++ b/app/views/drafts/edit.html.haml
@@ -1,6 +1,6 @@
11 - content_for(:title) { t('.title') }
22
3-.draft-actions.pull-right
3+.draft-actions.pull-right.text-right
44 %button.btn.btn-secondary{data: {target: '.draft-basic-into', toggle: 'collapse'}}
55 = fa_icon :info
66 %span.hidden-xs-down= t 'draft_info'
@@ -9,8 +9,14 @@
99 = fa_icon :mobile
1010 %span.hidden-xs-down= t 'device_preview'
1111 %span.hidden-sm-up= t 'device_preview_short'
12- = link_to fa_icon('chevron-circle-right')+' '+t('finish_edit'), new_theme_path(draft_key: @draft.key), class: 'btn btn-primary hidden-xs-down'
13- = link_to fa_icon('chevron-circle-right')+' '+t('finish_edit_short'), new_theme_path(draft_key: @draft.key), class: 'btn btn-primary hidden-sm-up'
12+ .btn-group
13+ %button.btn.btn-primary.dropdown-toggle{data: {toggle: :dropdown}}
14+ %span.hidden-xs-down= fa_icon('chevron-circle-right')+' '+t('finish_edit')
15+ %span.hidden-sm-up= fa_icon('chevron-circle-right')+' '+t('finish_edit_short')
16+ .dropdown-menu.dropdown-menu-right
17+ = link_to fa_icon('chevron-circle-right')+' '+t('start_publish_theme'), new_theme_path(draft_key: @draft.key), class: 'dropdown-item'
18+ .dropdown-divider
19+ = link_to fa_icon('file-o') + ' ' + t('clear_and_new_draft'), new_draft_path(new: 1), class: 'dropdown-item'
1420
1521 %h2= t '.title'
1622
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -98,6 +98,8 @@ en:
9898 device_preview_short: Preview
9999 finish_edit_short: Finish
100100 draft_info_short: Info
101+ clear_and_new_draft: New empty draft
102+ start_publish_theme: Start to publish theme
101103 draft_edit_desc_html: |
102104 You can edit your custom theme by here!<br />
103105 Currently MikuMikuWeather indicates daily weather as combination of two weather status. Primary is a main weather of the day, and secondary is supplemental.<br>
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -98,6 +98,8 @@ ja:
9898 device_preview_short: プレビュー
9999 finish_edit_short: 完了
100100 draft_info_short: 情報
101+ clear_and_new_draft: 空の新規テーマ編集へ
102+ start_publish_theme: テーマを公開する
101103 draft_edit_desc_html: |
102104 画像ファイルをアップロードして自分のテーマを作りましょう!<br />
103105 <br>