diff --git a/app/assets/images/golden-ticket.svg b/app/assets/images/golden-ticket.svg new file mode 100644 index 000000000..99d44fdf8 --- /dev/null +++ b/app/assets/images/golden-ticket.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/assets/images/star.svg b/app/assets/images/star.svg deleted file mode 100644 index 281a18051..000000000 --- a/app/assets/images/star.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index 2628615dc..3dbe697a3 100644 --- a/app/assets/stylesheets/_global.css +++ b/app/assets/stylesheets/_global.css @@ -42,6 +42,7 @@ --lch-blue: 54% 0.15 255; --lch-blue-light: 95% 0.03 255; --lch-blue-dark: 80% 0.08 255; + --lch-golden: 83% 0.1128 72.43; --lch-orange: 70% 0.2 44; --lch-red: 51% 0.2 31; --lch-green: 65.59% 0.234 142.49; @@ -69,6 +70,7 @@ --color-always-black: oklch(var(--lch-always-black)); --color-always-white: oklch(var(--lch-always-white)); --color-container: oklch(var(--lch-light-blue)); + --color-golden: oklch(var(--lch-golden)); @media (prefers-color-scheme: dark) { --lch-black: 100% 0 0; diff --git a/app/assets/stylesheets/buttons.css b/app/assets/stylesheets/buttons.css index 75c8baf10..693ba2429 100644 --- a/app/assets/stylesheets/buttons.css +++ b/app/assets/stylesheets/buttons.css @@ -109,7 +109,7 @@ display: none; } } - + &:has(input:checked) { --btn-background: var(--color-ink); --btn-color: var(--color-ink-reversed); @@ -188,5 +188,37 @@ animation: zoom-fade 300ms ease-out; } } + + .btn__group { + .btn { + --btn-border-radius: 0; + inline-size: 100%; + justify-content: center; + } + + form { + flex: 1 1 0%; + } + + :first-of-type .btn { + border-bottom-left-radius: 2em; + border-inline-end: 0; + border-top-left-radius: 2em; + flex: 1 0 50%; + padding-inline-end: 0.8em; + } + + :last-of-type .btn { + border-bottom-right-radius: 2em; + border-inline-start: 0; + border-top-right-radius: 2em; + flex: 1 0 50%; + padding-inline-start: 0.8em; + } + + span { + inline-size: 100%; + } + } } diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 8e83d2e4e..6f869df5c 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -28,6 +28,17 @@ } } + .card--golden.card--doing { + --border-color: var(--color-bg) !important; + + background-color: var(--color-bg); + background-image: linear-gradient(90deg, oklch(var(--lch-golden) / 0.5) 0%, oklch(var(--lch-golden) / 0.1) 50%, oklch(var(--lch-golden) / 0.75) 100%); + box-shadow: + 0 0 0.5em 0.2em var(--color-golden), + 0 0 1em 0.4em var(--color-golden) !important; + outline: 1px solid var(--color-golden); + } + .card__background { inset: 0; position: absolute; diff --git a/app/assets/stylesheets/icons.css b/app/assets/stylesheets/icons.css index 1f3d193dc..987210def 100644 --- a/app/assets/stylesheets/icons.css +++ b/app/assets/stylesheets/icons.css @@ -38,6 +38,7 @@ .icon--everyone { --svg: url("everyone.svg "); } .icon--filter { --svg: url("filter.svg "); } .icon--globe { --svg: url("globe.svg "); } + .icon--golden-ticket { --svg: url("golden-ticket.svg "); } .icon--home { --svg: url("home.svg "); } .icon--logout { --svg: url("logout.svg "); } .icon--menu { --svg: url("menu.svg "); } @@ -61,7 +62,6 @@ .icon--rename { --svg: url("rename.svg "); } .icon--settings { --svg: url("settings.svg "); } .icon--share { --svg: url("share.svg "); } - .icon--star { --svg: url("star.svg "); } .icon--tag { --svg: url("tag.svg "); } .icon--thumb-up { --svg: url("thumb-up.svg "); } .icon--trash { --svg: url("trash.svg "); } diff --git a/app/controllers/comments/reactions_controller.rb b/app/controllers/cards/comments/reactions_controller.rb similarity index 72% rename from app/controllers/comments/reactions_controller.rb rename to app/controllers/cards/comments/reactions_controller.rb index 17da85753..00f0ca8a9 100644 --- a/app/controllers/comments/reactions_controller.rb +++ b/app/controllers/cards/comments/reactions_controller.rb @@ -1,4 +1,4 @@ -class Comments::ReactionsController < ApplicationController +class Cards::Comments::ReactionsController < ApplicationController before_action :set_comment def index @@ -12,7 +12,7 @@ class Comments::ReactionsController < ApplicationController @reaction = @comment.reactions.create!(reaction_params) broadcast_create - redirect_to collection_card_comment_reactions_url(@comment.card.collection, @comment.card, @comment) + redirect_to card_comment_reactions_url(@comment.card, @comment) end def destroy @@ -33,7 +33,7 @@ class Comments::ReactionsController < ApplicationController def broadcast_create @reaction.broadcast_append_to @reaction.comment, :comments, - target: "reactions_comment_#{@comment.id}", partial: "comments/reactions/reaction", locals: { comment: @comment } + target: "reactions_comment_#{@comment.id}", partial: "cards/comments/reactions/reaction", locals: { comment: @comment } end def broadcast_remove diff --git a/app/controllers/comments_controller.rb b/app/controllers/cards/comments_controller.rb similarity index 93% rename from app/controllers/comments_controller.rb rename to app/controllers/cards/comments_controller.rb index 6d9540662..4f1745602 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/cards/comments_controller.rb @@ -1,4 +1,4 @@ -class CommentsController < ApplicationController +class Cards::CommentsController < ApplicationController include CardScoped before_action :set_comment, only: [ :show, :edit, :update, :destroy ] before_action :require_own_comment, only: [ :edit, :update, :destroy ] diff --git a/app/controllers/cards/goldnesses_controller.rb b/app/controllers/cards/goldnesses_controller.rb new file mode 100644 index 000000000..4be611d14 --- /dev/null +++ b/app/controllers/cards/goldnesses_controller.rb @@ -0,0 +1,13 @@ +class Cards::GoldnessesController < ApplicationController + include CardScoped + + def create + @card.gild + redirect_to @card + end + + def destroy + @card.ungild + redirect_to @card + end +end diff --git a/app/controllers/cards_controller.rb b/app/controllers/cards_controller.rb index 103c05e99..558f13d69 100644 --- a/app/controllers/cards_controller.rb +++ b/app/controllers/cards_controller.rb @@ -11,7 +11,7 @@ class CardsController < ApplicationController def index @considering = page_and_filter_for @filter.with(engagement_status: "considering", indexed_by: "latest"), per_page: PAGE_SIZE @doing = page_and_filter_for @filter.with(engagement_status: "doing", indexed_by: "latest"), per_page: PAGE_SIZE - @closed = page_and_filter_for @filter.with(indexed_by: "closed"), per_page: PAGE_SIZE + @closed = page_and_filter_for(@filter.with(indexed_by: "closed"), per_page: PAGE_SIZE) { |cards| cards.recently_closed_first } end def create @@ -40,8 +40,10 @@ class CardsController < ApplicationController end def page_and_filter_for(filter, per_page: nil) + cards = block_given? ? yield(filter.cards) : filter.cards + OpenStruct.new \ - page: GearedPagination::Recordset.new(filter.cards, per_page:).page(1), + page: GearedPagination::Recordset.new(cards, per_page:).page(1), filter: filter end diff --git a/app/helpers/cards_helper.rb b/app/helpers/cards_helper.rb index ba75a6d4a..1546efd8e 100644 --- a/app/helpers/cards_helper.rb +++ b/app/helpers/cards_helper.rb @@ -26,4 +26,19 @@ module CardsHelper class: "btn txt-small", **options end + + def card_article_tag(card, id: dom_id(card, :ticket), **options, &block) + classes = [ + options.delete(:class), + ("card--golden" if card.golden?), + ("card--doing" if card.doing?) + ].compact.join(" ") + + tag.article \ + id: id, + style: "--card-color: #{card.color}; view-transition-name: #{id}", + class: classes, + **options, + &block + end end diff --git a/app/javascript/controllers/local_time_controller.js b/app/javascript/controllers/local_time_controller.js index bdfbe677a..3bc77b769 100644 --- a/app/javascript/controllers/local_time_controller.js +++ b/app/javascript/controllers/local_time_controller.js @@ -24,6 +24,14 @@ export default class extends Controller { clearInterval(this.#timer) } + refreshAll() { + this.constructor.targets.forEach(targetName => { + this.targets.findAll(targetName).forEach(target => { + this.#formatTime(this[`${targetName}Formatter`], target) + }) + }) + } + timeTargetConnected(target) { this.#formatTime(this.timeFormatter, target) } diff --git a/app/models/card.rb b/app/models/card.rb index 4c50d6029..8d4411cf4 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -1,6 +1,7 @@ class Card < ApplicationRecord - include Assignable, Boostable, Colored, Commentable, Engageable, Eventable, - Messages, Notifiable, Pinnable, Closeable, Scorable, Searchable, Staged, Statuses, Taggable, Watchable + include Assignable, Boostable, Colored, Commentable, Engageable, Eventable, Golden, + Messages, Notifiable, Pinnable, Closeable, Scorable, Searchable, Staged, + Statuses, Taggable, Watchable belongs_to :collection, touch: true belongs_to :creator, class_name: "User", default: -> { Current.user } @@ -34,7 +35,7 @@ class Card < ApplicationRecord scope :by_engagement_status, ->(status) do case status.to_s when "considering" then considering - when "doing" then doing + when "doing" then doing.with_golden_first end end diff --git a/app/models/card/engageable.rb b/app/models/card/engageable.rb index aac48232c..f811b639a 100644 --- a/app/models/card/engageable.rb +++ b/app/models/card/engageable.rb @@ -7,7 +7,7 @@ module Card::Engageable has_one :engagement, dependent: :destroy, class_name: "Card::Engagement" scope :doing, -> { published.active.joins(:engagement) } - scope :considering, -> { published.active.where.missing(:engagement) } + scope :considering, -> { published_or_drafted_by(Current.user).active.where.missing(:engagement) } scope :stagnated, -> { doing.where(last_active_at: ..STAGNATED_AFTER.ago) } end diff --git a/app/models/card/golden.rb b/app/models/card/golden.rb new file mode 100644 index 000000000..759179415 --- /dev/null +++ b/app/models/card/golden.rb @@ -0,0 +1,23 @@ +module Card::Golden + extend ActiveSupport::Concern + + included do + scope :golden, -> { joins(:goldness) } + + has_one :goldness, dependent: :destroy, class_name: "Card::Goldness" + + scope :with_golden_first, -> { left_outer_joins(:goldness).prepend_order("card_goldnesses.id IS NULL") } + end + + def golden? + goldness.present? + end + + def gild + create_goldness! unless golden? + end + + def ungild + goldness&.destroy + end +end diff --git a/app/models/card/goldness.rb b/app/models/card/goldness.rb new file mode 100644 index 000000000..fc2697328 --- /dev/null +++ b/app/models/card/goldness.rb @@ -0,0 +1,3 @@ +class Card::Goldness < ApplicationRecord + belongs_to :card, touch: true +end diff --git a/app/models/comment.rb b/app/models/comment.rb index 8eb60d0f4..519fc9a72 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -18,23 +18,26 @@ class Comment < ApplicationRecord card_comments.many? && card_comments_prior.last&.creator != creator end - private + def to_partial_path + "cards/#{super}" + end - def cleanup_events - # Delete events that reference through event_summary - if message&.event_summary.present? - Event.where(summary: message.event_summary).destroy_all + private + def cleanup_events + # Delete events that reference through event_summary + if message&.event_summary.present? + Event.where(summary: message.event_summary).destroy_all + end + + # Delete events that reference directly in particulars + Event.where(particulars: { comment_id: id }).destroy_all end - # Delete events that reference directly in particulars - Event.where(particulars: { comment_id: id }).destroy_all - end + def card_comments_prior + card_comments.where(created_at: ...created_at) + end - def card_comments_prior - card_comments.where(created_at: ...created_at) - end - - def card_comments - Comment.joins(:message).where(messages: { card: card }) - end + def card_comments + Comment.joins(:message).where(messages: { card: card }) + end end diff --git a/app/views/cards/_golden_toggle.html.erb b/app/views/cards/_golden_toggle.html.erb new file mode 100644 index 000000000..b3525f351 --- /dev/null +++ b/app/views/cards/_golden_toggle.html.erb @@ -0,0 +1,11 @@ +<% if card.golden? %> + <%= button_to card_goldness_path(card), method: :delete, class: "btn btn--reversed" do %> + <%= icon_tag "golden-ticket" %> + Demote to normal + <% end %> +<% else %> + <%= button_to card_goldness_path(card), class: "btn" do %> + <%= icon_tag "golden-ticket" %> + Promote to golden + <% end %> +<% end %> diff --git a/app/views/cards/_messages.html.erb b/app/views/cards/_messages.html.erb index 5b7ed1ef5..ea6cbf0df 100644 --- a/app/views/cards/_messages.html.erb +++ b/app/views/cards/_messages.html.erb @@ -1,6 +1,6 @@ <%= messages_tag(card) do %> <%= render partial: "messages/message", collection: card.messages, cached: true %> - <%= render "comments/new", card: card, cached: true %> + <%= render "cards/comments/new", card: card, cached: true %>
Subscribers diff --git a/app/views/comments/_body.html.erb b/app/views/cards/comments/_body.html.erb similarity index 73% rename from app/views/comments/_body.html.erb rename to app/views/cards/comments/_body.html.erb index 4c58dfa51..a8f800f1a 100644 --- a/app/views/comments/_body.html.erb +++ b/app/views/cards/comments/_body.html.erb @@ -6,11 +6,11 @@ <%= link_to comment.creator.name, user_path(comment.creator), class: "txt-ink btn btn--plain fill-transparent", data: { turbo_frame: "_top" } %> - <%= link_to collection_card_path(comment.card.collection, comment.card, anchor: "comment_#{comment.id}"), class: "txt-undecorated txt-uppercase" do %> + <%= link_to card_path(comment.card, anchor: "comment_#{comment.id}"), class: "txt-undecorated txt-uppercase" do %> <%= local_datetime_tag comment.created_at, style: :shortdate, class: "txt-ink translucent" %> <% end %> - <%= link_to edit_collection_card_comment_path(comment.card.collection, comment.card, comment), + <%= link_to edit_card_comment_path(comment.card, comment), class: "comment__edit btn btn--plain txt-xx-small fill-transparent translucent flex-item-justify-end" do %> <%= icon_tag "menu-dots-horizontal" %> Edit this comment @@ -20,7 +20,7 @@ <%= sanitize comment.body_html %>
- <%= render "comments/reactions/reactions", comment: comment %> + <%= render "cards/comments/reactions/reactions", comment: comment %> <% end %> <% end %> diff --git a/app/views/comments/_comment.html.erb b/app/views/cards/comments/_comment.html.erb similarity index 77% rename from app/views/comments/_comment.html.erb rename to app/views/cards/comments/_comment.html.erb index f90ed8ee6..c866f30f0 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/cards/comments/_comment.html.erb @@ -3,5 +3,5 @@ <%= avatar_tag comment.creator, hidden_for_screen_reader: true %> - <%= render "comments/body", comment: comment %> + <%= render "cards/comments/body", comment: comment %> <% end %> diff --git a/app/views/comments/_new.html.erb b/app/views/cards/comments/_new.html.erb similarity index 89% rename from app/views/comments/_new.html.erb rename to app/views/cards/comments/_new.html.erb index 8c75edcf1..2352d1797 100644 --- a/app/views/comments/_new.html.erb +++ b/app/views/cards/comments/_new.html.erb @@ -5,7 +5,7 @@
- <%= form_with model: Comment.new, url: collection_card_comments_path(card.collection, card), class: "flex flex-column gap full-width", + <%= form_with model: Comment.new, url: card_comments_path(card), class: "flex flex-column gap full-width", data: { controller: "form paste local-save", local_save_key_value: "comment-#{card.id}", action: "turbo:submit-end->local-save#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop paste->paste#pasteFiles" } do |form| %> diff --git a/app/views/comments/create.html.erb b/app/views/cards/comments/create.html.erb similarity index 100% rename from app/views/comments/create.html.erb rename to app/views/cards/comments/create.html.erb diff --git a/app/views/comments/edit.html.erb b/app/views/cards/comments/edit.html.erb similarity index 73% rename from app/views/comments/edit.html.erb rename to app/views/cards/comments/edit.html.erb index 795a79d71..e3a2e783d 100644 --- a/app/views/comments/edit.html.erb +++ b/app/views/cards/comments/edit.html.erb @@ -1,14 +1,14 @@ <%= turbo_frame_tag dom_id(@comment) do %>
- <%= form_with model: [@card.collection, @card, @comment], class: "flex flex-column gap full-width", + <%= form_with model: [ @card, @comment ], class: "flex flex-column gap full-width", data: { controller: "form paste", action: "keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop paste->paste#pasteFiles" } do |form| %> <%= form.markdown_area :body, class: "input comment__input", required: true, autofocus: true, placeholder: new_comment_placeholder(@card) %>
<%= form.button class: "btn btn--reversed", type: :submit do %> Save changes <% end %> - <%= link_to collection_card_comment_path(@card.collection, @card, @comment), class: "btn", data: { form_target: "cancel" } do %> + <%= link_to card_comment_path(@card, @comment), class: "btn", data: { form_target: "cancel" } do %> Cancel <% end %> @@ -20,7 +20,7 @@
<% end %> - <%= form_with url: collection_card_comment_path(@card.collection, @card, @comment), method: :delete, id: dom_id(@comment, :delete_form), data: { turbo_frame: "_top" } %> + <%= form_with url: card_comment_path(@card, @comment), method: :delete, id: dom_id(@comment, :delete_form), data: { turbo_frame: "_top" } %>
<% end %> diff --git a/app/views/comments/reactions/_reaction.html.erb b/app/views/cards/comments/reactions/_reaction.html.erb similarity index 92% rename from app/views/comments/reactions/_reaction.html.erb rename to app/views/cards/comments/reactions/_reaction.html.erb index c5790204d..d88ed4fae 100644 --- a/app/views/comments/reactions/_reaction.html.erb +++ b/app/views/cards/comments/reactions/_reaction.html.erb @@ -13,7 +13,7 @@ class: [ "txt-small", { "txt-medium": reaction.all_emoji? } ], data: { action: "click->reaction-delete#reveal keydown.enter->reaction-delete#reveal:prevent", reaction_delete_target: "content" } %> - <%= button_to collection_card_comment_reaction_path(comment.card.collection, comment.card, comment, reaction), + <%= button_to card_comment_reaction_path(comment.card, comment, reaction), method: :delete, class: "btn btn--negative flex-item-justify-end reaction__delete", data: { action: "reaction-delete#perform", reaction_delete_target: "button" } do %> diff --git a/app/views/comments/reactions/_reactions.html.erb b/app/views/cards/comments/reactions/_reactions.html.erb similarity index 70% rename from app/views/comments/reactions/_reactions.html.erb rename to app/views/cards/comments/reactions/_reactions.html.erb index 0106deefe..5c9b9f846 100644 --- a/app/views/comments/reactions/_reactions.html.erb +++ b/app/views/cards/comments/reactions/_reactions.html.erb @@ -2,12 +2,12 @@ <%= turbo_stream_from comment, :comments %>
- <%= render partial: "comments/reactions/reaction", collection: comment.reactions.ordered, locals: { comment: comment }, cached: true %> + <%= render partial: "cards/comments/reactions/reaction", collection: comment.reactions.ordered, locals: { comment: comment }, cached: true %>
<%= turbo_frame_tag comment, :new_reaction do %>
- <%= link_to new_collection_card_comment_reaction_path(comment.card.collection, comment.card, comment), role: "button", + <%= link_to new_card_comment_reaction_path(comment.card, comment), role: "button", class: "btn reaction__action", action: "soft-keyboard#open" do %> <%= icon_tag "reaction" %> Add a reaction diff --git a/app/views/cards/comments/reactions/index.html.erb b/app/views/cards/comments/reactions/index.html.erb new file mode 100644 index 000000000..74863a9f1 --- /dev/null +++ b/app/views/cards/comments/reactions/index.html.erb @@ -0,0 +1 @@ +<%= render "cards/comments/reactions/reactions", comment: @comment %> diff --git a/app/views/comments/reactions/new.html.erb b/app/views/cards/comments/reactions/new.html.erb similarity index 84% rename from app/views/comments/reactions/new.html.erb rename to app/views/cards/comments/reactions/new.html.erb index fc3983949..a7945c112 100644 --- a/app/views/comments/reactions/new.html.erb +++ b/app/views/cards/comments/reactions/new.html.erb @@ -1,5 +1,5 @@ <%= turbo_frame_tag dom_id(@comment, :new_reaction) do %> - <%= form_with url: collection_card_comment_reactions_path(@comment.card.collection, @comment.card, @comment), + <%= form_with url: card_comment_reactions_path(@comment.card, @comment), class: "reaction reaction__form flex-inline postion--relative max-width align-center fill-white gap expanded", html: { aria: { label: "New reaction" } }, data: { controller: "form", turbo_frame: dom_id(@comment, :reacting), action: "keydown.esc->form#cancel" } do |form| %> @@ -17,7 +17,7 @@ Submit <% end %> - <%= link_to collection_card_comment_reactions_path(@comment.card.collection, @comment.card, @comment), role: "button", + <%= link_to card_comment_reactions_path(@comment.card, @comment), role: "button", data: { turbo_frame: dom_id(@comment, :reactions), form_target: "cancel" }, class: "btn btn--negative" do %> <%= icon_tag "minus" %> Cancel diff --git a/app/views/cards/comments/show.html.erb b/app/views/cards/comments/show.html.erb new file mode 100644 index 000000000..a17046280 --- /dev/null +++ b/app/views/cards/comments/show.html.erb @@ -0,0 +1 @@ +<%= render "cards/comments/body", comment: @comment %> diff --git a/app/views/cards/comments/update.html.erb b/app/views/cards/comments/update.html.erb new file mode 100644 index 000000000..a17046280 --- /dev/null +++ b/app/views/cards/comments/update.html.erb @@ -0,0 +1 @@ +<%= render "cards/comments/body", comment: @comment %> diff --git a/app/views/cards/display/_perma.html.erb b/app/views/cards/display/_perma.html.erb index 9c745de8a..63db3b40d 100644 --- a/app/views/cards/display/_perma.html.erb +++ b/app/views/cards/display/_perma.html.erb @@ -1,5 +1,5 @@ <% cache card do %> -
+ <%= card_article_tag card, class: "card" do %>
<%= link_to card.collection.name, cards_path(collection_ids: [card.collection]), class: "card__collection txt-uppercase overflow-ellipsis txt-reversed" %> @@ -35,5 +35,5 @@ <%= render "cards/display/common/background", card: card %> -
+ <% end %> <% end %> diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb index a1d39d78c..f6582d6e0 100644 --- a/app/views/cards/display/_preview.html.erb +++ b/app/views/cards/display/_preview.html.erb @@ -1,7 +1,5 @@ <% cache [ card ] do %> -
+ <%= card_article_tag card, class: "card" do %>
<%= card.collection.name %> <%= render "cards/display/preview/tags", card: card %> @@ -24,5 +22,5 @@ <%= render "cards/display/common/background", card: card %> -
+ <% end %> <% end %> diff --git a/app/views/cards/display/common/_meta.html.erb b/app/views/cards/display/common/_meta.html.erb index 50f9492cc..d2ba79b98 100644 --- a/app/views/cards/display/common/_meta.html.erb +++ b/app/views/cards/display/common/_meta.html.erb @@ -4,10 +4,17 @@
Added <%= local_datetime_tag(card.created_at, style: :daysago) %> + <% if card.drafted? %> + (Draft) + <% end %> - <%= card.creating? ? "Created" : "Updated" %> - <%= local_datetime_tag(card.updated_at, style: :daysago) %> + <% if card.creating? %> +   + <% else %> + Updated + <%= local_datetime_tag(card.updated_at, style: :daysago) %> + <% end %> Reported by <%= familiar_name_for(card.creator) %> diff --git a/app/views/cards/show.html.erb b/app/views/cards/show.html.erb index fa977390b..f28f3b135 100644 --- a/app/views/cards/show.html.erb +++ b/app/views/cards/show.html.erb @@ -31,11 +31,7 @@ <%= render "cards/doing_toggle", card: @card %>