<% if current_user %>
  <div id="graph" style="width: 100%; height: 300px;"></div>
<% else %>
  We have about <%= @users_count %> users using the system and <%= @tasks_count %> tasks registered in.
<% end %>

<% content_for :footer_javascripts do %>
  <% if current_user %>
    <% javascript_tag do %>
      var graph = Morris.Line({
        element: 'graph',
        data: <%= @processed_tasks.to_json.to_s.html_safe %>,
        xkey: 'day',
        ykeys: ['done', 'todo'],
        labels: ['Done', 'To do'],
        parseTime: false,
        hideHover: true
      });
    <% end %>
  <% end %>
<% end %>

<% if current_user %>
  <div id="graph" style="width: 100%; height: 300px;"></div>
<% else %>
  <p>We have about <%= @users_count %> users using the system and <%= @tasks_count %> tasks registered in.</p>
  <p>know more about the project at <%= link_to 'Github', 'https://github.com/eduardoschneiders/tasktracker/', target: '_blank' %>.</p>
<% end %>

<% content_for :footer_javascripts do %>
  <% if current_user %>
    <% javascript_tag do %>
      var graph = Morris.Line({
        element: 'graph',
        data: <%= @processed_tasks.to_json.to_s.html_safe %>,
        xkey: 'day',
        ykeys: ['done', 'todo'],
        labels: ['Done', 'To do'],
        parseTime: false,
        hideHover: true
      });
    <% end %>
  <% end %>
<% end %>

Add github link at home
Add github link at home
