extra_field_list.php 949 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. api_protect_global_admin_script();
  5. $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')];
  6. $template = new Template(get_lang('Extra fields'));
  7. $types = ExtraField::getValidExtraFieldTypes();
  8. $table = new HTML_Table(['class' => 'table']);
  9. $table->setHeaderContents(0, 0, get_lang('Type'));
  10. $table->setHeaderContents(0, 1, get_lang('Detail'));
  11. $url = api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=';
  12. $row = 1;
  13. foreach ($types as $key => $label) {
  14. $table->setCellContents($row, 0, $label);
  15. $table->setCellContents(
  16. $row,
  17. 1,
  18. Display::url(
  19. get_lang('List'),
  20. $url.''.$label,
  21. ['class' => 'btn btn-default']
  22. )
  23. );
  24. $row++;
  25. }
  26. $content = $table->toHtml();
  27. $template->assign('content', $content);
  28. $template->display_one_col_template();