Exemplo n.º 1
0
template_menu_links = [template_list, template_orphan_list, supplier_list]
inventory_menu_links = [
    inventory_list,#, inventory_transaction_list, inventory_transaction_create
]

location_filter = {'name':'location', 'title':_(u'location'), 'queryset':Location.objects.all(), 'destination':'location'}

register_links(['template_list', 'template_create', 'template_view', 'template_orphans_list', 'template_update', 'template_delete', 'template_photos', 'template_assign_supply', 'template_assign_suppliers'], [template_create], menu_name='sidebar')
register_links(ItemTemplate, [template_update, template_delete, template_photos, template_assets, template_assign_supplies, template_assign_suppliers])

register_links(['supplier_list', 'supplier_create', 'supplier_update', 'supplier_view', 'supplier_delete', 'supplier_assign_itemtemplates'], [supplier_create], menu_name='sidebar')
register_links(Supplier, [supplier_update, supplier_delete, supplier_assign_itemtemplate, supplier_purchase_orders])

register_links(['inventory_view', 'inventory_list', 'inventory_create', 'inventory_update', 'inventory_delete', 'inventory_transaction_list'], [inventory_create], menu_name='sidebar')
register_links(Inventory, [inventory_update, inventory_delete, inventory_list_transactions, inventory_create_transaction])
register_links(Inventory, [inventory_view], menu_name='sidebar')

register_links(['inventory_transaction_list', 'inventory_transaction_create', 'inventory_transaction_update', 'inventory_transaction_delete', 'inventory_transaction_view'], [inventory_create_transaction], menu_name='sidebar')
register_links(InventoryTransaction, [inventory_transaction_view, inventory_transaction_update, inventory_transaction_delete, jump_to_template])
register_links(InventoryTransaction, [jump_to_inventory], menu_name='sidebar')

register_links(['location_list', 'location_create', 'location_update', 'location_delete'], [location_create], menu_name='sidebar')
register_links(Location, [location_update, location_delete])

register_menu([
    {'text':_('templates'), 'view':'template_list', 'links':template_menu_links, 'famfam':'page', 'position':1},
    {'text':_('inventories'), 'view':'inventory_list', 'links':inventory_menu_links,'famfam':'package', 'position':4},
])


Exemplo n.º 2
0
        "person_update",
        "person_delete",
        "person_photos",
        "person_assign_item",
    ],
    [person_create],
    menu_name="sidebar",
)
register_links(Person, [person_update, person_delete, person_photos, person_assign_item])

register_links(
    ["group_list", "group_view", "group_create", "group_update", "group_delete"], [group_create], menu_name="sidebar"
)
register_links(ItemGroup, [group_update, group_delete])

register_links(["state_list", "state_create", "state_update", "state_delete"], [state_create], menu_name="sidebar")
register_links(State, [state_edit, state_delete])


register_menu(
    [
        {
            "text": _("assets"),
            "view": "item_list",
            "links": [asset_list, asset_orphan_list, group_list, person_list],
            "famfam": "computer",
            "position": 2,
        }
    ]
)
Exemplo n.º 3
0
from django.utils.translation import ugettext_lazy as _
from DAMS.apps.common.api import register_menu

register_menu([
    {'text':_(u'search'), 'view':'search', 'famfam':'zoom', 'position':5},
])