publiclab/spectral-workbench

View on GitHub
app/views/graph/_tools.html.erb

Summary

Maintainability
Test Coverage
<div class="toolbar">
  <p class="credit">
    by <a target="_blank" href="/profile/<%= datum.author %>"><%= datum.author %></a> <% if type == :spectrum && datum.has_powertag('forked') %>(<a href="/spectrums/<%= datum.powertag('forked') %>">fork</a>)<% end %>
    <span class="site">
      on 
      <span class="spectral-workbench">
        <img src="/images/spectralworkbench.png" /> 
        <a class="normal" target="_blank" href="/">SpectralWorkbench.org</a>
        <a class="super-tiny" target="_blank" href="/">SW</a>
      </span>
    </span>
  </p>

  <div class="tools">

    <a target="_blank" href="http://twitter.com/share?text=<%= datum.title %> on @PublicLab's Spectral Workbench&url=https://spectralworkbench.org/<%= type %>s/<%= datum.id %>"><i class="fa fa-twitter"></i></a>
    <a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fspectralworkbench.org%2F<%= type %>s%2F<%= datum.id %>"><i class="fa fa-facebook"></i></a>
    <a href="#embed-modal" data-toggle="modal"><i class="fa fa-share"></i></a>

    <% if type == :spectrum %>
      <a target="_blank" href="/<%= type %>s/<%= datum.id %>"><i class="fa fa-comment"></i> <%= datum.comments.length %></a>
    <% end %>

    <% unless is_embed? %>
      <a rel="tooltip" 
         title="There are notifications for this spectrum."  
         class="notification-count-icon" 
         href="#notifications" 
         style="display:none;">
        <i style="color:orange;" 
           class="fa fa-exclamation-circle"></i>
        <span id="notification-count"></span>
      </a>
    <% end %>

    <div class="dropup"> 
      <a data-toggle="dropdown" class="dropdown-toggle settings" href="#"><i class="fa fa-cog"></i></a>
      <ul class="dropdown-menu" role="menu">
        <li><a href="//publiclab.org/wiki/spectral-workbench-help">Help</a></li>
        <li class="divider"></li>
        <% if type == :set %>
          <li><a onClick="$W.run_macro('warren','equalize-height');">Equalize height</a></li>
          <li><a onClick="$W.run_macro('warren','equalize_area');">Equalize area</a></li>
          <li><a href="/sets/edit/<%= datum.id %>">Edit set</a></li>
        <% end %>
        <li><a href="/<%= type %>/<%= datum.id %>">Comment</a></li>
      </ul>
    </div>
  </div>
</div>