rm clone-with-slug
Clones are rare, cloning is broken. It makes more sense to clone from an item's page.
This commit is contained in:
@@ -390,7 +390,6 @@ def delete_thumbs(item):
|
|||||||
|
|
||||||
@page_inventory.route("/m/inventory/assign-mac/<slug>")
|
@page_inventory.route("/m/inventory/assign-mac/<slug>")
|
||||||
@page_inventory.route("/m/inventory/assign-slug/<slug>")
|
@page_inventory.route("/m/inventory/assign-slug/<slug>")
|
||||||
@page_inventory.route("/m/inventory/clone-with-slug/<slug>")
|
|
||||||
@page_inventory.route("/m/inventory")
|
@page_inventory.route("/m/inventory")
|
||||||
def view_inventory(slug=None):
|
def view_inventory(slug=None):
|
||||||
user = request.args.get("user", type=ObjectId)
|
user = request.args.get("user", type=ObjectId)
|
||||||
@@ -433,13 +432,7 @@ def view_inventory(slug=None):
|
|||||||
|
|
||||||
if slug and not public_view:
|
if slug and not public_view:
|
||||||
template = "inventory_pick.html"
|
template = "inventory_pick.html"
|
||||||
if request.path.startswith("/m/inventory/clone-with-slug"):
|
if request.path.startswith("/m/inventory/assign-slug"):
|
||||||
action_method = "get"
|
|
||||||
action_path = "clone-by-slug"
|
|
||||||
action_label = "Clone"
|
|
||||||
action_help = "Cloning item to new slug"
|
|
||||||
pick = True
|
|
||||||
elif request.path.startswith("/m/inventory/assign-slug"):
|
|
||||||
q.update({"shortener.slug": None})
|
q.update({"shortener.slug": None})
|
||||||
action_method = "get"
|
action_method = "get"
|
||||||
action_path = "edit-by-slug"
|
action_path = "edit-by-slug"
|
||||||
|
@@ -14,9 +14,6 @@ It can be assigned to an existing item or a new item can be created.
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="/m/inventory/assign-slug/{{ slug }}" class="waves-effect waves-light btn">Assign to existing item</a>
|
<a href="/m/inventory/assign-slug/{{ slug }}" class="waves-effect waves-light btn">Assign to existing item</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<a href="/m/inventory/clone-with-slug/{{ slug }}" class="waves-effect waves-light btn">Clone existing item</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user