Sha256: 3259d01978a02e33675fe9f87ea7b000ade8cb8606f23f89f1cfb23ea58d7ab8

Contents?: true

Size: 1.88 KB

Versions: 94

Compression:

Stored size: 1.88 KB

Contents

<div  class="Vlt-card Vlt-article">
<center>
  <h1>Product Feedback Summary</h1>
</center>
  <div>
    <%= form_tag({}, {:method => :get}) do %>
       <div class="Vlt-form__group">
        <div class="Vlt-form__element Vlt-form__element--elastic">
          <label class="Vlt-label">
          Created After
        </label> 
        <div class="Vlt-input"><%= date_field_tag :created_after, @created_after %></div>
        </div>
        <div class="Vlt-form__element Vlt-form__element--elastic">
          <label class="Vlt-label">
          Created Before
        </label> 
        <div class="Vlt-input"><%= date_field_tag :created_before, @created_before %></div>
        </div>
      
      <%= link_to 'Reset', '/stats', class: "Vlt-btn Vlt-btn--tertiary Vlt-btn--app" %> &nbsp;
      <%= submit_tag 'Update', class: 'Vlt-btn Vlt-btn--secondary Vlt-btn--app' %>
      </div>
    <% end %>
  </div>

  <div>
    <% unless @summary %>
    <p>Please choose a date range</p>
    <% else %>
    <% @summary.each do |product, months| %>
    <h3><%= product %></h3>
    <div class="Vlt-table Vlt-table--bordered"><table>
      <thead>
      <tr>
        <th>Month</th>
        <th>Positive</th>
        <th>Neutral</th>
        <th>Negative</th>
        <th>Percentage</th>
      </tr>
      </thead>
      <tbody>
      <% months.each do |month, data| %>
      <% data['positive'] = data['positive'] || 0 %>
      <% data['neutral'] = data['neutral'] || 0 %>
      <% data['negative'] = data['negative'] || 0 %>
      <tr>
        <td><%= month.strftime("%b %Y") %></td>
        <td><%= data['positive'] %></td>
        <td><%= data['neutral'] %></td>
        <td><%= data['negative'] %></td>
        <td><%= (data['positive']/((data['positive'] + data['negative'] + data['neutral']).to_f)*100).round(2) %>%</td>
      </tr>
      <% end %>
      </tbody>
    </table>
    </div>
    <% end %>
    <% end %>
  </div>

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.1.5 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.1.4 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.1.3 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.1.2 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.1.1 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.1.0 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.145 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.144 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.143 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.142 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.141 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.140 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.139 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.138 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.137 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.136 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.135 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.134 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.133 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb
station-0.0.132 lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb