Skip to content

Commit f8f8f86

Browse files
committed
Add message when event has no description
Looks weird having just an empty box
1 parent 819378c commit f8f8f86

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

app/views/events/show.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
<%= google_maps_javascript_api_tag(@event) if @event.show_map? %>
6969
<% if @event.description.present? %>
7070
<%= render_markdown @event.description %>
71+
<% else %>
72+
<span class="muted">No description provided</span>
7173
<% end %>
7274
</div>
7375
</div>

app/views/workflows/embed.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<i class="fa fa-sitemap"></i> <%= @workflow.title %>
33
<% end %>
44
<% content_for :sidebar_description do %>
5-
<% if @workflow.description.blank? %>
6-
<p class="muted">No description provided</p>
7-
<% else %>
5+
<% if @workflow.description.present? %>
86
<%= render_markdown(@workflow.description) %>
7+
<% else %>
8+
<p class="muted">No description provided</p>
99
<% end %>
1010
<%= render partial: 'common/extra_metadata', locals: { resource: @workflow } %>
1111
<% end %>

app/views/workflows/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<i class="fa fa-sitemap"></i> <%= @workflow.title %>
2121
<% end %>
2222
<% content_for :sidebar_description do %>
23-
<% if @workflow.description.blank? %>
24-
<p class="muted">No description provided</p>
25-
<% else %>
23+
<% if @workflow.description.present? %>
2624
<%= render_markdown(@workflow.description) %>
25+
<% else %>
26+
<p class="muted">No description provided</p>
2727
<% end %>
2828
<%= render partial: 'common/extra_metadata', locals: { resource: @workflow } %>
2929
<% if policy(@workflow).update? && @workflow.edit_suggestion %>

0 commit comments

Comments
 (0)