browsebycard.html.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * The instance list view file of space module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Jianhua Wang <wangjianhua@easycorp.ltd>
  8. * @package space
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <div class='main-cell' id='cardsContainer'>
  14. <?php if(empty($instances)):?>
  15. <div class="table-empty-tip">
  16. <p><?php echo html::a($this->createLink('store', 'browse'), $lang->space->noApps . ', ' . $lang->space->notice->toInstall, '', "class='btn btn-info'");?></p>
  17. </div>
  18. <?php else:?>
  19. <div class="row">
  20. <?php foreach ($instances as $instance):?>
  21. <div class='col-sm-4 col-md-3 col-lg-3' data-id='<?php echo $instance->id;?>'>
  22. <div class='panel'>
  23. <div class='panel-heading'>
  24. <div class="q-card-title">
  25. <a href="<?php echo helper::createLink('instance', 'view', "id=$instance->id");?>">
  26. <?php echo $instance->name;?>&nbsp;
  27. </a>
  28. </div>
  29. <?php if(!empty($instance->latestVersion) && empty($instance->solution)):?>
  30. <div class="q-metal"><?php echo empty($instance->latestVersion->change_log_url) ? $lang->space->upgrade : html::a($instance->latestVersion->change_log_url, $lang->space->upgrade, '_blank');?></div>
  31. <?php endif;?>
  32. </div>
  33. <div class='panel-body'>
  34. <div class="instance-detail">
  35. <a href="<?php echo helper::createLink('instance', 'view', "id=$instance->id");?>">
  36. <div class='instance-logo'>
  37. <?php echo html::image($instance->logo ? $instance->logo : '', "referrer='origin'");?>
  38. </div>
  39. <p class="instance-intro"><?php echo $instance->introduction;?>&nbsp;</p>
  40. </a>
  41. </div>
  42. <div class="instance-actions">
  43. <?php $canVisit = $this->instance->canDo('visit', $instance);?>
  44. <?php echo html::a($this->instance->url($instance), $lang->instance->visit, '_blank', "class='btn btn-primary' title='{$lang->instance->visit}'". ($canVisit ? '' : ' disabled style="pointer-events: none;"'));?>
  45. <?php if(!empty($instance->latestVersion) && empty($instance->solution)):?>
  46. <?php echo html::a(helper::createLink('instance', 'upgrade', "id=$instance->id", '', true), "<i class='icon-sync'></i>" . $lang->space->upgrade, '', "class='btn btn-link iframe' title='{$lang->space->upgrade}' data-width='500' data-app='space'");?>
  47. <?php endif;?>
  48. <?php if($instance->solution):?>
  49. <?php echo html::a(helper::createLink('solution', 'view', "id=$instance->solution"), $instance->solutionData->name, '', "title='{$instance->solutionData->name}' class='label label-success label-outline solution-link text-ellipsis'");?>
  50. <?php endif;?>
  51. </div>
  52. </div>
  53. <div class='panel-footer instance-footer'>
  54. <?php $channel = zget($lang->instance->channelList, $instance->channel, '');?>
  55. <div class="pull-left"><?php echo $instance->appVersion . ($config->cloud->api->switchChannel && $channel ? " ($channel)" : '');?></div>
  56. <div class="pull-right instance-status" instance-id="<?php echo $instance->id;?>" data-status="<?php echo $instance->status;?>">
  57. <?php $this->instance->printStatus($instance);?>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <?php endforeach;?>
  63. </div>
  64. <div class='table-footer'><?php $pager->show('right', 'pagerjs', 4800, 12);?></div>
  65. <?php endif;?>
  66. <div>