Sha256: 03a04769dc025cc9f17e7d930fa19c520ae3eba72d6b0c2b78ba1de00b4e5ed2

Contents?: true

Size: 1.39 KB

Versions: 36

Compression:

Stored size: 1.39 KB

Contents

<h1>Message</h1>

<% if participant_signed_in? && !current_participant.coach_assignment %>
  <p class="lead">You will be able use this tool once you have been assigned a coach</p>
<% elsif current_user && can?(:create, SiteMessage) %>
  <div class="btn-toolbar" role="toolbar">
    <%= link_to "Messages", coach_group_messages_path(@group), class: "btn btn-default" %>
    <%= link_to "Compose", new_coach_group_message_path(@group), class: "btn btn-default" %>
  </div>
<% elsif current_participant && current_participant.active_membership.present? %>
  <div class="btn-toolbar">
    <%= (link_to "Compose", compose_path, class: "btn btn-default") if current_user || current_participant.active_membership.group.arm.can_message_after_membership_complete? || current_participant.in_study? %>
  </div>
<% end %>

<%= render "think_feel_do_engine/messages/message_info", message: message %>

<% user_id = current_user.try(:id) || current_participant.try(:id) %>
<% unless message.sender.id == user_id %>
  <% if (current_participant && current_participant.in_study?) || current_user %>
       <div class="well">
         <%= (link_to "Reply to this message", reply_path) if current_user || current_participant && current_participant.active_membership.group.arm.can_message_after_membership_complete? || current_participant.in_study? %>
  </div>
  <% end %>

  <%= link_to "Cancel", :back, class: "btn btn-default" %>
<% end %>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
think_feel_do_engine-3.12.8 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.7 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.6 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.5 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.4 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.3 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.2 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.1 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.12.0 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.11.3 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.11.0 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.10.10 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.10.9 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.10.8 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.10.7 app/views/think_feel_do_engine/messages/show.html.erb
think_feel_do_engine-3.10.6 app/views/think_feel_do_engine/messages/show.html.erb