edit.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Assemblies -- User assembly widget edit view
  4. *
  5. * @package Lorea
  6. * @subpackage Assemblies
  7. *
  8. * Copyright 2012-2013 Lorea Faeries <federation@lorea.org>
  9. *
  10. * This file is part of the Assemblies plugin for Elgg.
  11. *
  12. * Assemblies is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License as
  14. * published by the Free Software Foundation, either version 3 of the
  15. * License, or (at your option) any later version.
  16. *
  17. * Assemblies is distributed in the hope that it will be useful, but
  18. * WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. * Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public
  23. * License along with this program. If not, see
  24. * <http://www.gnu.org/licenses/>.
  25. */
  26. // set default value
  27. if (!isset($vars['entity']->num_display)) {
  28. $vars['entity']->num_display = 4;
  29. }
  30. $params = array(
  31. 'name' => 'params[num_display]',
  32. 'value' => $vars['entity']->num_display,
  33. 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
  34. );
  35. $dropdown = elgg_view('input/dropdown', $params);
  36. ?>
  37. <div>
  38. <?php echo elgg_echo('assemblies:assembly:numbertodisplay'); ?>:
  39. <?php echo $dropdown; ?>
  40. </div>