diff --git a/app/controllers/workshop_logs_controller.rb b/app/controllers/workshop_logs_controller.rb index 49adc2a73..4577abc8a 100644 --- a/app/controllers/workshop_logs_controller.rb +++ b/app/controllers/workshop_logs_controller.rb @@ -72,7 +72,7 @@ def create def show @workshop_log = Report.find(params[:id]).decorate - @workshop = @workshop_log.workshop.decorate + @workshop = @workshop_log.workshop&.decorate @answers = @workshop_log.report_form_field_answers if @workshop_log diff --git a/app/frontend/stylesheets/application.tailwind.css b/app/frontend/stylesheets/application.tailwind.css index b26cbf066..f0ea48b67 100644 --- a/app/frontend/stylesheets/application.tailwind.css +++ b/app/frontend/stylesheets/application.tailwind.css @@ -73,3 +73,7 @@ .readonly textarea { @apply bg-gray-100 text-gray-500 cursor-not-allowed border-gray-300; } + +.rotate-180 { + transform: rotate(180deg); +} diff --git a/app/views/community_news/show.html.erb b/app/views/community_news/show.html.erb index df851d810..0eebc6a29 100644 --- a/app/views/community_news/show.html.erb +++ b/app/views/community_news/show.html.erb @@ -19,7 +19,7 @@ -
+
diff --git a/app/views/quotes/index.html.erb b/app/views/quotes/index.html.erb index 10e0e056f..4c58523c3 100644 --- a/app/views/quotes/index.html.erb +++ b/app/views/quotes/index.html.erb @@ -44,7 +44,7 @@ - + <%# end %>
diff --git a/app/views/resources/show.html.erb b/app/views/resources/show.html.erb index af32cd4a1..76b5180be 100644 --- a/app/views/resources/show.html.erb +++ b/app/views/resources/show.html.erb @@ -1,109 +1,126 @@ -
-
+
+
+
+ +
+ + <%= render "bookmarks/editable_bookmark_button", resource: @resource.object %> + -
- <% if current_user.super_user? %> - <%= link_to("Edit", edit_resource_path(@resource), class: "btn btn-primary-outline admin-only bg-blue-100") %> - <% end %> - - <%= link_to ("" + - " Download ").html_safe, - resource_download_path(@resource), - class: "btn btn-utility" if @resource.download_attachment&.file&.attached? %> - <%= render "bookmarks/editable_bookmark_button", resource: @resource.object %> -
+ <% if current_user.super_user? %> + <%= link_to("Edit", edit_resource_path(@resource), + class: "admin-only bg-blue-100 btn btn-primary-outline") %> + <% end %> + <%= link_to ("" + + " Download ").html_safe, + resource_download_path(@resource), + class: "btn btn-utility" if @resource.download_attachment&.file&.attached? %> +
- -
+ +
- -

- <%= @resource.display_title %> -

+ +

+ <%= @resource.display_title %> +

- <% if @resource.inactive? %> -
- [HIDDEN] +
+ <% if @resource.featured %> + + 🌟 Dashboard Feature + + <% end %> + <% if @resource.inactive? %> + + Hidden + + <% end %>
- <% end %> - -
- <% unless @resource.toolkit_and_form? %> -
- <%= @resource.author %> - <% unless @resource.story? %> - "> - <%= @resource.display_date %> - - <% end %> -
- <% end %> -
-
- - <% if @resource.main_image&.file&.attached? %> -
- <%= image_tag @resource.main_image.file, - class: "w-full rounded-lg shadow-sm border border-gray-200", - alt: @resource.title %> -
- <% end %> + +
+ <% unless @resource.toolkit_and_form? %> +
+ <%= @resource.author %> + <% unless @resource.story? %> + "> + <%= @resource.display_date %> + + <% end %> +
+ <% end %> +
+ +
+ + <% if @resource.main_image&.file&.attached? %> +
+ <%= image_tag @resource.main_image.file, + class: "w-full rounded-lg shadow-sm border border-gray-200", + alt: @resource.title %> +
+ <% end %> - - <% if @resource.gallery_images.any? { |img| img.persisted? && img.file.attached? } %> - - - <% if @resource.url.present? %> +
- <%= link_to @resource.url, @resource.url, target: "_blank", - rel: "noopener noreferrer", - class: "text-blue-600 hover:underline break-words" %> + <%= @resource.display_text %>
- <% end %> - - -
- <%= @resource.display_text %> -
- - - <% if @resource.attachments.any? %> -
-

Attachment:

-
    - <% @resource.attachments.each do |attachment| %> - <% if attachment.file&.attached? %> -
  • - <%= link_to ("" + - " #{ attachment.file_file_name } ").html_safe, - resource_download_path(@resource, - attachment_id: attachment.id), - class: "btn btn-utility" if attachment&.file&.attached? %> -
  • + + <% if @resource.attachments.any? %> +
    +

    Attachment:

    +
      + <% @resource.attachments.each do |attachment| %> + <% if attachment.file&.attached? %> +
    • + <%= link_to ("" + + " #{ attachment.file_file_name } ").html_safe, + resource_download_path(@resource, + attachment_id: attachment.id), + class: "btn btn-utility" if attachment&.file&.attached? %> +
    • + <% end %> <% end %> - <% end %> -
    -
    - <% end %> +
+
+ <% end %> +
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb index 033854678..0a6881705 100644 --- a/app/views/stories/show.html.erb +++ b/app/views/stories/show.html.erb @@ -1,8 +1,9 @@ <% story_url = story_url(@story) %> <% story_title = ERB::Util.url_encode(@story.title) %> +
-
+
@@ -24,99 +25,109 @@
-
-
- - -

- <%= @story.title %> -

- - -
-

Story by: <%= @story.story_idea&.author_credit || @story.created_by.full_name %>

-

Organization Name: <%= @story.organization_name %>

- <% if @story.decorate.workshop_title.present? %> -

Workshop: <%= @story.decorate.workshop_title %>

- <% end %> -
- -
- - <% if @story.main_image&.file&.attached? %> -
- <%= image_tag @story.main_image.file, - class: "w-full rounded-lg shadow-sm border border-gray-200", - alt: @story.title %> -
+
+ + +

+ <%= @story.title %> +

+ + +
+

Story by: + <% author_credit = @story.story_idea&.author_credit || @story.created_by.full_name %> + <% if @story.created_by.facilitator&.profile_is_searchable %> + <%= link_to author_credit, facilitator_path(@story.created_by) %> + <% else %> + <%= author_credit %> <% end %> +

+

Organization Name: + <%= link_to @story.decorate.organization_name, + organization_path(@story.project), + class: "hover:underline" %> +

+ <% if @story.decorate.workshop_title.present? %> +

Workshop: + <%= link_to @story.decorate.workshop_title, workshop_path(@story.workshop), class: "hover:underline" %> +

+ <% end %> +
- - <% if @story.gallery_images.any? { |img| img.persisted? && img.file.attached? } %> -
-
- <% @story.gallery_images.each_with_index do |gallery_image, idx| %> - <% if gallery_image.file&.attached? %> - <%= image_tag url_for(gallery_image.file), - alt: "Gallery Image #{idx + 1}", - data: { file_preview_target: "preview" }, - class: "w-32 h-32 object-cover border border-gray-300 shadow-sm" %> - <% end %> +
+ + <% if @story.main_image&.file&.attached? %> +
+ <%= image_tag @story.main_image.file, + class: "w-full rounded-lg shadow-sm border border-gray-200", + alt: @story.title %> +
+ <% end %> + + + <% if @story.gallery_images.any? { |img| img.persisted? && img.file.attached? } %> +
+
+ <% @story.gallery_images.each_with_index do |gallery_image, idx| %> + <% if gallery_image.file&.attached? %> + <%= image_tag url_for(gallery_image.file), + alt: "Gallery Image #{idx + 1}", + data: { file_preview_target: "preview" }, + class: "w-32 h-32 object-cover border border-gray-300 shadow-sm" %> <% end %> -
+ <% end %>
- <% end %> -
- - -
- <%= simple_format(@story.body) %> -
- - -

Share this Story:

- -
- - - <%= link_to "https://www.facebook.com/sharer/sharer.php?u=#{story_url}", - target: "_blank", rel: "noopener", - class: "text-blue-600 hover:text-blue-800" do %> - - <% end %> +
+ <% end %> +
- - <%= link_to "https://twitter.com/intent/tweet?url=#{story_url}&text=#{story_title}", - target: "_blank", rel: "noopener", - class: "text-sky-500 hover:text-sky-700" do %> - - <% end %> + +
+ <%= simple_format(@story.body) %> +
- - <%= link_to "https://www.linkedin.com/sharing/share-offsite/?url=#{story_url}", - target: "_blank", rel: "noopener", - class: "text-blue-700 hover:text-blue-900" do %> - - <% end %> + +

Share this Story:

+ +
+ + + <%= link_to "https://www.facebook.com/sharer/sharer.php?u=#{story_url}", + target: "_blank", rel: "noopener", + class: "text-blue-600 hover:text-blue-800" do %> + + <% end %> + + + <%= link_to "https://twitter.com/intent/tweet?url=#{story_url}&text=#{story_title}", + target: "_blank", rel: "noopener", + class: "text-sky-500 hover:text-sky-700" do %> + + <% end %> + + + <%= link_to "https://www.linkedin.com/sharing/share-offsite/?url=#{story_url}", + target: "_blank", rel: "noopener", + class: "text-blue-700 hover:text-blue-900" do %> + + <% end %> + + + <%= link_to "https://pinterest.com/pin/create/button/?url=#{story_url}&description=#{story_title}", + target: "_blank", rel: "noopener", + class: "text-red-600 hover:text-red-800" do %> + + <% end %> - - <%= link_to "https://pinterest.com/pin/create/button/?url=#{story_url}&description=#{story_title}", - target: "_blank", rel: "noopener", - class: "text-red-600 hover:text-red-800" do %> - - <% end %> +
-
- - -
- A Window Between Worlds (AWBW) - supports hundreds of art workshop facilitators across the country to - incorporate creative expression into their work with trauma survivors. - These Windows Facilitators serve over 140,000 adults, teens, and children each year. - Through these stories, we invite you to explore and share their journeys - toward transformation and healing. -
+
+ A Window Between Worlds (AWBW) + supports hundreds of art workshop facilitators across the country to + incorporate creative expression into their work with trauma survivors. + These Windows Facilitators serve over 140,000 adults, teens, and children each year. + Through these stories, we invite you to explore and share their journeys + toward transformation and healing.
diff --git a/app/views/story_ideas/show.html.erb b/app/views/story_ideas/show.html.erb index 3d6bebe68..03ebf364c 100644 --- a/app/views/story_ideas/show.html.erb +++ b/app/views/story_ideas/show.html.erb @@ -16,7 +16,7 @@

Workshop: - <%= @story_idea.workshop.title %> + <%= @story_idea.workshop&.title || @story_idea.external_workshop_title %>

diff --git a/app/views/workshops/_show_associations.html.erb b/app/views/workshops/_show_associations.html.erb index a72f9da6a..904712e78 100644 --- a/app/views/workshops/_show_associations.html.erb +++ b/app/views/workshops/_show_associations.html.erb @@ -73,7 +73,7 @@
<%= link_to resource_path(spotlight), class: "flex flex-col items-center text-center" do %>