Sha256: 4e1a036c7079fec361333054d883f2e375edd52f2a7471bf2acd1d76dfcdccc7

Contents?: true

Size: 877 Bytes

Versions: 4

Compression:

Stored size: 877 Bytes

Contents

<h1>Edit Dashboard</h1>

<% if Prosperity::Graph.exists? %>
  <ul>
    <% @dashboard.graphs.each do |graph| %>
      <li>
        <%= link_to graph.title, edit_graph_path(graph) %>
        -
        <%= link_to 'Delete', dashboard_dashboard_graphs_path(dashboard_id: @dashboard.id, graph_id: graph.id), method: :delete %>
      </li>
    <% end %>
  </ul>

  <%= form_tag({}, class: "link-graph", method: "POST") do %>
    <%= hidden_field_tag :dashboard_id, @dashboard.id %>
    <%= hidden_field_tag :url_template, dashboard_dashboard_graphs_path(dashboard_id: 'dashboard_id', graph_id: 'graph_id') %>
    <%= select_tag :graph_id, options_from_collection_for_select(Prosperity::Graph.all, :id, :title) %>
    <%= submit_tag "Add To Dashboard", class: 'btn btn-success' %>
  <% end %>

  OR 
<% end %>

<%= link_to "Add New Graph", new_graph_path, class: 'btn btn-primary' %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
prosperity-0.0.5 app/views/prosperity/dashboards/edit.html.erb
prosperity-0.0.4 app/views/prosperity/dashboards/edit.html.erb
prosperity-0.0.3 app/views/prosperity/dashboards/edit.html.erb
prosperity-0.0.2 app/views/prosperity/dashboards/edit.html.erb