-
-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new styling for expandable tabes to hint that they can be expande…
…d when clicked.
- Loading branch information
1 parent
2789927
commit d160974
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Customized Styling for Exandable Tables - provided by AdminLTE | ||
* ExpandableTable - https://adminlte.io/docs/3.1/javascript/expandable-tables.html | ||
*/ | ||
|
||
/* | ||
* Default Expanded table has no indicator that the row is clickable. This styles an expand/collapse icon. | ||
* Expanded=true is minus, Expanded=false is plus | ||
*/ | ||
[data-widget="expandable-table"] { | ||
&[aria-expanded="true"] { | ||
td > .fa::before{ | ||
content: "\f068"; | ||
} | ||
} | ||
|
||
&[aria-expanded="false"] { | ||
td > .fa::before{ | ||
content: "\f067"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
<% row_item = row.last %> | ||
<tr data-widget="expandable-table" aria-expanded="false"> | ||
<td><i class="fa" /></td> | ||
<td><%= link_to(row_item[:item_name], item_url(row_item[:item_id])) %></td> | ||
<td class="numeric"><%= row_item[:quantity] %></td> | ||
<td class="numeric"><%= row_item[:item_on_hand_minimum_quantity] %></td> | ||
<td class="numeric"><%= row_item[:item_on_hand_recommended_quantity] %></td> | ||
</tr> | ||
<tr class="expandable-body"> | ||
<td colspan="4"> | ||
<td colspan="5"> | ||
<p> | ||
<% row_item[:locations].each do |location_name, quantity| %> | ||
<p><%= "#{location_name} - #{quantity} units" %></p> | ||
<%= "#{location_name} - #{quantity} units" %><br> | ||
<% end %> | ||
</p> | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters