PageRenderTime 43ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/default/dashboard/board/index.php

https://bitbucket.org/sriedel/iccrm-wip
PHP | 52 lines | 28 code | 12 blank | 12 comment | 3 complexity | 54b284db80b9d38846ce264a6596c4eb MD5 | raw file
Possible License(s): MIT
  1. <?php
  2. /**
  3. * @created 30.09.12 - 20:52
  4. * @author stefanriedel
  5. */
  6. ?>
  7. <?php
  8. if (is_array($dashboard_items) && count($dashboard_items) > 0) {
  9. $opened = false;
  10. foreach ($dashboard_items as $i => $item) {
  11. if (0 === $i % 3) {
  12. echo ($opened) ? '</div>' : '';
  13. echo '<div class="row" >';
  14. $opened = true;
  15. }
  16. echo '<div id="item-' . $i . '" class="span4">' . $item . '</div>';
  17. /**try
  18. {
  19. \Request::forge($item->route, false)->execute()->response()->body;
  20. }
  21. catch (\Exception $e)
  22. {
  23. \Debug::dump($e);
  24. }**/
  25. }
  26. echo "</div>";
  27. }
  28. ?>
  29. <script type="text/javascript">
  30. $('div.dashitem').each(function (a, b, c) {
  31. var $this = $(b);
  32. $.ajax({
  33. url: $this.attr('rel'),
  34. dataType: 'json',
  35. success: function(a, b, c){
  36. console.log(a, b, c);
  37. }
  38. });
  39. });
  40. </script>