This repository has been archived by the owner on Sep 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit has some changes to the message index UI requested by @keithrwilson. Changes include: - Don't truncate message body - Make it more clear what days messages are sent on and at what time - Move everything out of the table where it is squished together and difficult to read - Make tags more usable by providing links - Hide buttons for users that aren't admins (snuck in some early work on #241)
- Loading branch information
Showing
9 changed files
with
98 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h1><%= message.title %></h1> | ||
<p><%= message.body %></p> | ||
<% if message.last_sent_at.present? %> | ||
<p> | ||
<strong>Last sent at:</strong> | ||
<%= message.last_sent_at %> | ||
</p> | ||
<% end %> | ||
<% if current_user.admin? %> | ||
<%= link_to broadcast_message_send_broadcast_messages_path(message), method: :post, class: 'button button-send', data: { confirm: "Are you sure you want to send this message to all Slack users right now?" } do %> | ||
<icon class="icon-send"></icon> | ||
<span>Send</span> | ||
<% end %> | ||
<%= link_to new_broadcast_message_test_message_path(message), class: 'button button-test' do %> | ||
<icon class="icon-send"></icon> | ||
<span>Test</span> | ||
<% end %> | ||
<% end %> | ||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/views/onboarding_messages/_onboarding_message.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<h1><%= message.title %></h1> | ||
<h2> | ||
Day <%= message.days_after_start %> - | ||
<%= message.time_of_day.strftime('%l:%M %p') %> | ||
</h2> | ||
<p><%= message.body %></p> | ||
<% if message.end_date.present? %> | ||
<p> | ||
<strong>End date:</strong> | ||
<%= message.end_date %> | ||
</p> | ||
<% end %> | ||
<p> | ||
<strong>Tags:</strong> | ||
<% message.tag_list.each do |tag| %> | ||
<%= link_to tag, onboarding_messages_path(tag: tag, title: '', body: '') %> | ||
<% end %> | ||
</p> | ||
<% if current_user.admin? %> | ||
<%= link_to edit_onboarding_message_path(message), class: 'button button-edit' do %> | ||
<icon class="icon-edit"></icon> | ||
<span>Edit</span> | ||
<% end %> | ||
<%= link_to new_onboarding_message_test_message_path(message), class: 'button button-test' do %> | ||
<icon class="icon-send"></icon> | ||
<span>Test</span> | ||
<% end %> | ||
<%= link_to 'Delete', message, | ||
method: :delete, | ||
class: 'button button-delete icon-circle-x', | ||
data: { confirm: 'Are you sure you want to delete this message?' } | ||
%> | ||
<% end %> | ||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<h1><%= message.title %></h1> | ||
<p><%= message.body %></p> | ||
<p> | ||
<strong>Tags:</strong> | ||
<% message.tag_list.each do |tag| %> | ||
<%= link_to tag, quarterly_messages_path(tag: tag, title: '', body: '') %> | ||
<% end %> | ||
</p> | ||
<% if current_user.admin? %> | ||
<%= link_to edit_quarterly_message_path(message), class: 'button button-edit' do %> | ||
<icon class="icon-edit"></icon> | ||
<span>Edit</span> | ||
<% end %> | ||
<%= link_to new_quarterly_message_test_message_path(message), class: 'button button-test' do %> | ||
<icon class="icon-send"></icon> | ||
<span>Test</span> | ||
<% end %> | ||
<%= link_to 'Delete', message, | ||
method: :delete, | ||
class: 'button button-delete icon-circle-x', | ||
data: { confirm: 'Are you sure you want to delete this message?' } | ||
%> | ||
<% end %> | ||
<hr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters