-
Notifications
You must be signed in to change notification settings - Fork 58
Conversation
What about updating the links on the other equipment pages not to be hitting |
370d096
to
01f0534
Compare
It looks like I preemptively pushed! This is ready for review; I also added single category export. |
01f0534
to
cf25f3f
Compare
@@ -48,7 +48,6 @@ | |||
<% else %> | |||
<%= link_to "New Equipment Item", new_equipment_item_path, class: 'btn btn-primary' %> | |||
<%= link_to "Import Equipment Item", equip_import_page_path, class: 'btn btn-default' %> | |||
<%= link_to "Export Equipment Data", categories_path(format: 'zip'), :class => "btn btn-default" %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't want to include the export link on the equipment items index? Any reason why not?
Let's verify the case where the description (or some other field) contains a comma and make sure it doesn't break everything. |
@@ -70,4 +70,20 @@ def download_equipment_data | |||
download_zip([categories, models, items], | |||
"EquipmentData_#{Time.zone.now.to_s(:number)}") | |||
end | |||
|
|||
# NOTE: this method depends on ActionController | |||
def download_category_data(cat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this basically does the same thing as download_equipment_data
except it restricts the export to a single category? I feel like this is a lot of duplication in that case.
Another note: the export button does not appear on the scoped equipment model index view (i.e. |
Reviewed, a bunch of things to look into, let me know what you think! |
Somewhat surprisingly, it's okay to have fields with commas |
Okay, ready for rereview |
<%= link_to "View All Equipment Models", equipment_models_path, :class => 'btn btn-default' %> | ||
<%= link_to "View All Equipment Models", equipment_models_path, class: 'btn btn-default' %> | ||
<%= link_to "Import Equipment Models", equip_import_page_path, class: "btn btn-default" %> | ||
<%= link_to "Export Equipment Data", equipment_models_path(format: 'zip'), class: "btn btn-default" %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this the category_path(@category, format: 'zip')
instead since it's a scoped view and you built scoped export?
A few small comments left, almost there! |
Okay this is probably ready! |
Looks good! Can you squash / rebase onto the latest |
378dec6
to
278cadb
Compare
This is ready to go! |
Resolves #1499