diff --git a/core/systems/project/card_view.ex b/core/systems/project/card_view.ex
index 498a9df2b..4bd1c1596 100644
--- a/core/systems/project/card_view.ex
+++ b/core/systems/project/card_view.ex
@@ -4,6 +4,7 @@ defmodule Systems.Project.CardView do
import Frameworks.Pixel.Tag
import Frameworks.Pixel.ClickableCard
alias Frameworks.Pixel.Card
+ alias Frameworks.Pixel.Image
attr(:card, :map, required: true)
@@ -57,6 +58,8 @@ defmodule Systems.Project.CardView do
attr(:title, :string, required: true)
attr(:label, :map, required: true)
attr(:tags, :list, default: [])
+ attr(:image_info, :map, default: nil)
+ attr(:icon_url, :string, default: nil)
attr(:bg_color, :string, default: "grey1")
attr(:text_color, :string, default: "text-white")
@@ -77,12 +80,30 @@ defmodule Systems.Project.CardView do
right_actions={@right_actions}
>
<:top>
- <%= if @label do %>
-
- <.spacing value="S" />
-
+
+ <%= if @label do %>
+
+
+
+ <% end %>
+
+ <%= if @icon_url do %>
+
+
+
+ <% end %>
+
+ <%= if @image_info do %>
+
+
+
+ <% end %>
- <% end %>
<:title>
diff --git a/core/systems/project/item_model.ex b/core/systems/project/item_model.ex
index f3013eff9..4f784d745 100644
--- a/core/systems/project/item_model.ex
+++ b/core/systems/project/item_model.ex
@@ -5,6 +5,8 @@ defmodule Systems.Project.ItemModel do
import Ecto.Changeset
import CoreWeb.Gettext
+ alias Core.ImageHelpers
+
alias Systems.{
Project,
Assignment,
@@ -87,14 +89,18 @@ defmodule Systems.Project.ItemModel do
assignment:
%{
id: assignment_id,
+ status: status,
info: %{
- subject_count: subject_count
+ subject_count: subject_count,
+ image_id: image_id,
+ logo_url: logo_url
}
} = assignment
},
{Project.NodePage, :item_card},
_user
) do
+ image_info = ImageHelpers.get_image_info(image_id, 120, 115)
tags = get_card_tags(assignment)
path = ~p"/assignment/#{assignment_id}/content"
@@ -112,7 +118,9 @@ defmodule Systems.Project.ItemModel do
type: :secondary,
id: id,
path: path,
- label: get_label(:concept),
+ image_info: image_info,
+ icon_url: logo_url,
+ label: get_label(status),
title: name,
tags: tags,
info: ["#{subject_count} participants | 0 donations"],