<template name="resident">
  {{#if Template.subscriptionsReady}}
    <h1 class="page-header">
      <button type="button" class="btn btn-success pull-right" id="add-feeling">
        <i class="fa fa-stethoscope"></i>
        {{_ "resident-addFeeling-buttonText" }}
      </button>
      <button type="button" class="btn btn-success pull-right" id="add-activity">
        <i class="fa fa-heartbeat"></i>
        {{_ "resident-addActivity-buttonText" }}
      </button>

      {{ resident.firstName }} {{ resident.lastInitial }}

      {{# if isInRole 'admin' }}
      <button id="edit-resident" class="btn btn-default">
        {{_ "resident-editButton" }}
      </button>
      {{/ if }}
    </h1>
    <div class="row">
      {{> residentFeelings residentId=resident._id }}
    </div>
    <!-- make sure resident has activities -->
    {{# if activities }}
      <div class="row">
        {{>
          residentActivities
          resident=resident
          activities=activities
        }}
      </div>
    {{ else }}
      <p>
        {{_ "resident-noRecordedActivities-text" }}
      </p>
    {{/ if }}
  {{ else }}
    {{> spinner }}
  {{/ if }}
</template>

<template name="resident">
  {{#if Template.subscriptionsReady}}
    <h1 class="page-header">
      {{# if currentUser }}
      <button type="button" class="btn btn-success pull-right" id="add-feeling">
        <i class="fa fa-stethoscope"></i>
        {{_ "resident-addFeeling-buttonText" }}
      </button>
      <button type="button" class="btn btn-success pull-right" id="add-activity">
        <i class="fa fa-heartbeat"></i>
        {{_ "resident-addActivity-buttonText" }}
      </button>
      {{/ if }}<!-- current user -->

      {{ resident.firstName }} {{ resident.lastInitial }}

      {{# if isInRole 'admin' }}
      <button id="edit-resident" class="btn btn-default">
        {{_ "resident-editButton" }}
      </button>
      {{/ if }}
    </h1>
    <div class="row">
      {{> residentFeelings residentId=resident._id }}
    </div>
    <!-- make sure resident has activities -->
    {{# if activities }}
      <div class="row">
        {{>
          residentActivities
          resident=resident
          activities=activities
        }}
      </div>
    {{ else }}
      <p>
        {{_ "resident-noRecordedActivities-text" }}
      </p>
    {{/ if }}
  {{ else }}
    {{> spinner }}
  {{/ if }}
</template>

Hide 'add activity' and 'add feeling' buttons from anonymous user
Hide 'add activity' and 'add feeling' buttons from anonymous user
