-
-
Notifications
You must be signed in to change notification settings - Fork 527
/
Copy pathindex.html.erb
88 lines (85 loc) · 3.41 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<% content_for :title, "Barcode Items - Inventory - #{current_organization.name}" %>
<h1>
Barcode Items
<small>(unique to <%= current_organization.name %>)</small>
</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><%= link_to(dashboard_path) do %>
<i class="fa fa-dashboard"></i> Home
<% end %>
</li>
<li class="breadcrumb-item"><a href="#">Barcode Items</a></li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">Barcode Filters</h3>
</div>
<div class="card-body">
<%= form_with(url: barcode_items_path, method: :get) do |f| %>
<div class="row">
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
<%= filter_select(label: "Filter by Item Category", scope: :barcodeable_id, collection: @items.alphabetized, key: :id, value: :name, selected: @selected_barcodeable_id) %>
</div>
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
<%= filter_select(label: "Filter by Base Item", scope: :by_item_partner_key, collection: @base_items.order('name'), key: :partner_key, value: :name, selected: @selected_partner_key) %>
</div>
<div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
<%= filter_text(label: "Filter By Barcode (Boop it!)", scope: :by_value, selected: @selected_barcode_id) %>
</div>
</div>
<div class="card-footer">
<%= filter_button %>
<%= clear_filter_button %>
<span class="float-right">
<%= download_button_to(barcode_items_path(format: :csv, filters: filter_params.merge(date_range: date_range_params)), {text: "Export Barcode Items", size: "md"}) if @barcode_items.any? %>
<%= download_button_to(font_barcode_items_path, {text: "Download Barcode Font"}) %>
<%= new_button_to new_barcode_item_path, {text: "New Barcode"} %>
</span>
</div>
<% end # form %>
</div>
</div>
<!-- /.card -->
</div>
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
<div class="container-fluid">
<div class="row">
<div class="col-12">
<!-- Default box -->
<div class="card">
<div class="card-body p-0">
<table class="table">
<thead>
<tr>
<th class="text-left">Item Type</th>
<th class="text-left">Quantity in the Box</th>
<th class="text-left">Barcode</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
<%= render partial: "barcode_item_row", collection: @barcode_items %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>