예제 #1
0
$itemsAdministrationMenu = $page->getMenu();
$itemsAdministrationMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/inventory/item_new.php', $gL10n->get('INV_CREATE_ITEM'), 'add.png');
// show link to room management
$itemsAdministrationMenu->addItem('menu_item_manage_rooms', $g_root_path . '/adm_program/modules/rooms/rooms.php', $gL10n->get('DAT_SWITCH_TO_ROOM_ADMINISTRATION'), 'home.png');
if ($gCurrentUser->isWebmaster()) {
    // show link to maintain profile fields
    $itemsAdministrationMenu->addItem('menu_item_maintain_inventory_fields', $g_root_path . '/adm_program/modules/inventory/fields.php', $gL10n->get('PRO_MAINTAIN_ITEM_FIELDS'), 'application_form_edit.png');
}
// Create table object
$itemsTable = new HtmlTable('tbl_invent', $page, true, true, 'table table-condensed');
// create array with all column heading values
$columnHeading = array($gL10n->get('SYS_ABR_NO'), $gL10n->get('SYS_NAME'), $gL10n->get('SYS_ROOM'), $gL10n->get('MEM_UPDATED_ON'), ' ');
$itemsTable->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$itemsTable->disableDatatablesColumnsSort(5);
$itemsTable->addRowHeadingByArray($columnHeading);
$itemsTable->setDatatablesRowsPerPage($gPreferences['members_users_per_page']);
$itemsTable->setMessageIfNoRowsFound('SYS_NO_ENTRIES');
$irow = 1;
// count for line in table
while ($row = $mglStatement->fetch()) {
    $timestampChange = new DateTimeExtended($row['timestamp'], 'Y-m-d H:i:s');
    $room = new TableRooms($gDb, $row['room_id']);
    $roomLink = $g_root_path . '/adm_program/system/msg_window.php?message_id=room_detail&message_title=DAT_ROOM_INFORMATIONS&message_var1=' . $row['room_id'] . '&inline=true';
    // create array with all column values
    $columnValues = array($irow, '<a href="' . $g_root_path . '/adm_program/modules/inventory/item.php?item_id=' . $row['inv_id'] . '">' . $row['item_name'] . '</a>', '<a class="admidio-icon-link-popup" href="' . $roomLink . '">' . $room->getValue('room_name') . '</a>');
    $columnValues[] = $timestampChange->format($gPreferences['system_date'] . ' ' . $gPreferences['system_time']);
    $itemAdministration = '';
    // Link to modify Item
    $itemAdministration .= '<a class="admidio-icon-link" href="' . $g_root_path . '/adm_program/modules/inventory/item_new.php?item_id=' . $row['inv_id'] . '"><img
                                src="' . THEME_PATH . '/icons/edit.png" alt="' . $gL10n->get('MEM_EDIT_USER') . '" title="' . $gL10n->get('MEM_EDIT_USER') . '" /></a>';
    // remove Item
예제 #2
0
            $listsMenu->addItem('menu_item_full_screen', $g_root_path . '/adm_program/modules/lists/lists_show.php?lst_id=' . $getListId . '&amp;rol_ids=' . $getRoleIds . '&amp;mode=html&amp;show_members=' . $getShowMembers . '&amp;full_screen=true&amp;date_from=' . $getDateFrom . '&date_to=' . $getDateTo . '', $gL10n->get('SYS_FULL_SCREEN'), 'arrow_out.png');
        }
        if ($numberRoles === 1) {
            // link to assign or remove members if you are allowed to do it
            if ($role->allowedToAssignMembers($gCurrentUser)) {
                $listsMenu->addItem('menu_item_assign_members', $g_root_path . '/adm_program/modules/lists/members_assignment.php?rol_id=' . $role->getValue('rol_id'), $gL10n->get('SYS_ASSIGN_MEMBERS'), 'add.png');
            }
        }
        // link to print overlay and exports
        $listsMenu->addItem('menu_item_print_view', '#', $gL10n->get('LST_PRINT_PREVIEW'), 'print.png');
        $form = new HtmlForm('navbar_export_to_form', '', $page, array('type' => 'navbar', 'setFocus' => false));
        $selectBoxEntries = array('' => $gL10n->get('LST_EXPORT_TO') . ' ...', 'csv-ms' => $gL10n->get('LST_MICROSOFT_EXCEL') . ' (' . $gL10n->get('SYS_ISO_8859_1') . ')', 'pdf' => $gL10n->get('SYS_PDF') . ' (' . $gL10n->get('SYS_PORTRAIT') . ')', 'pdfl' => $gL10n->get('SYS_PDF') . ' (' . $gL10n->get('SYS_LANDSCAPE') . ')', 'csv-oo' => $gL10n->get('SYS_CSV') . ' (' . $gL10n->get('SYS_UTF8') . ')');
        $form->addSelectBox('export_list_to', null, $selectBoxEntries, array('showContextDependentFirstEntry' => false));
        $listsMenu->addForm($form->show(false));
        $table = new HtmlTable('adm_lists_table', $page, $hoverRows, $datatable, $classTable);
        $table->setDatatablesRowsPerPage($gPreferences['lists_members_per_page']);
    } else {
        $table = new HtmlTable('adm_lists_table', $page, $hoverRows, $datatable, $classTable);
    }
}
// initialize array parameters for table and set the first column for the counter
if ($getMode === 'html') {
    // in html mode we group leaders. Therefore we need a special hidden column.
    $columnAlign = array('left', 'left');
    $columnValues = array($gL10n->get('SYS_ABR_NO'), $gL10n->get('INS_GROUPS'));
} else {
    $columnAlign = array('left');
    $columnValues = array($gL10n->get('SYS_ABR_NO'));
}
// headlines for columns
for ($columnNumber = 1; $columnNumber <= $list->countColumns(); ++$columnNumber) {