Skip to content

Commit 113dc4c

Browse files
Merge pull request #54 from cortex-cms/topic/COR-686-Add-Recommendation-Text-to-Media
COR-686: Add Recommendation Text to Media
2 parents 4780fed + 360d9f2 commit 113dc4c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

app/cells/plugins/core/asset/input.haml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
= render_max_asset_size
66
%br
77
= render_field_id
8+
- if @options[:tooltip]
9+
%p
10+
= render_tooltip
811
= render_label
912
= render_input

app/cells/plugins/core/asset_cell.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def render_input
3939
@options[:form].file_field 'data[asset]'
4040
end
4141

42+
def render_tooltip
43+
@options[:tooltip]
44+
end
45+
4246
def associated_content_item_thumb_url
4347
data['asset']['style_urls']['mini']
4448
end

lib/tasks/cortex/core/media.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ namespace :cortex do
6666
"grid_width": 12,
6767
"elements": [
6868
{
69-
"id": media.fields.find_by_name('Asset').id
69+
"id": media.fields.find_by_name('Asset').id,
70+
"tooltip": "Recommended blog featured image size: 1452px x 530px with a live area of 930px x 530px"
7071
}
7172
]
7273
}

0 commit comments

Comments
 (0)