From 9f24adc38d5b9cbb69f506c8ab47d347cdd80c9d Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Mon, 10 May 2021 15:25:21 +0900 Subject: [PATCH] =?UTF-8?q?WIP:=20=E6=A4=9C=E7=B4=A2=E7=B5=90=E6=9E=9C?= =?UTF-8?q?=E5=90=91=E4=B8=8A=E3=81=AE=E3=81=9F=E3=82=81=20h1-h4=20?= =?UTF-8?q?=E3=81=AB=20ID=20=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/text_widget/details.html.haml | 3 +++ app/views/text_widget/show.html.haml | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 app/views/text_widget/details.html.haml diff --git a/app/views/text_widget/details.html.haml b/app/views/text_widget/details.html.haml new file mode 100644 index 000000000..c134a9d2a --- /dev/null +++ b/app/views/text_widget/details.html.haml @@ -0,0 +1,3 @@ += scrivito_small_dialog do + = scrivito_details_for 'Anchor' do + = scrivito_tag(:div, widget, :anchor) diff --git a/app/views/text_widget/show.html.haml b/app/views/text_widget/show.html.haml index e7847111d..26cf18921 100644 --- a/app/views/text_widget/show.html.haml +++ b/app/views/text_widget/show.html.haml @@ -1 +1,5 @@ +- if widget.respond_to? :anchor + .text-anchor{id: "#{widget.anchor}"} +- else + .text-anchor = scrivito_tag :div, widget, :text