You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.5 KiB

2 years ago
  1. <header class="big top color {$contact->color}"
  2. style="
  3. background-image:
  4. linear-gradient(to top, rgba(23,23,23,0.9) 0, rgba(23,23,23,0.6) 5rem, rgba(23,23,23,0) 12rem), url('{$info->getPicture(\Movim\ImageSize::XXL)}');
  5. ">
  6. {if="$info != null && $info->pubsubpublishmodel != null && $info->pubsubpublishmodel != 'publishers'"}
  7. {if="$info->pubsubpublishmodel == 'open' || ($info->pubsubpublishmodel == 'subscribers' && $subscription != null)"}
  8. <a class="button action color" title="{$c->__('menu.add_post')}" href="{$c->route('publish', [$server, $node])}">
  9. <i class="material-symbols">{if="$info->isGallery()"}add_photo_alternate{else}post_add{/if}</i>
  10. </a>
  11. {/if}
  12. {else}
  13. <a onclick="CommunityHeader_ajaxTestPublish('{$server}', '{$node}')" class="button action color" title="{$c->__('menu.add_post')}">
  14. <i class="material-symbols">{if="$info!= null && $info->isGallery()"}add_photo_alternate{else}post_add{/if}</i>
  15. </a>
  16. {/if}
  17. <ul class="list thick">
  18. <li>
  19. {if="$info != null"}
  20. <span class="primary icon bubble active"
  21. onclick="MovimUtils.reload('{$c->route('community', [$server, $info->node])}')">
  22. <img src="{$info->getPicture(\Movim\ImageSize::L)}"/>
  23. </span>
  24. {/if}
  25. <div>
  26. {if="$c->getUser()->hasPubsub()"}
  27. {if="$subscription == null"}
  28. <button class="button oppose color green" title="{$c->__('communityheader.subscribe')}"
  29. onclick="CommunityHeader_ajaxAskSubscribe('{$server|echapJS}', '{$node|echapJS}')">
  30. <i class="material-symbols">bookmark_add</i> <span class="on_desktop">{$c->__('communityheader.subscribe')}</span>
  31. </button>
  32. {else}
  33. <button class="button oppose color gray" title="{$c->__('communityheader.unsubscribe')}"
  34. onclick="CommunityHeader_ajaxAskUnsubscribe('{$server|echapJS}', '{$node|echapJS}')">
  35. <i class="material-symbols">bookmark_remove</i> <span class="on_desktop">{$c->__('communityheader.unsubscribe')}</span>
  36. </button>
  37. {/if}
  38. {/if}
  39. <p class="line">
  40. {if="$info != null"}
  41. {if="$info->name"}
  42. {$info->name}
  43. {else}
  44. {$info->node}
  45. {/if}
  46. {else}
  47. {$node}
  48. {/if}
  49. </p>
  50. <p class="line on_desktop" {if="$info != null && $info->description"}title="{$info->description|strip_tags}"{/if}>
  51. <a href="#" onclick="MovimUtils.reload('{$c->route('community', $server)}')">
  52. {$server}
  53. </a>
  54. </p>
  55. <p class="line on_mobile">
  56. <a href="#" onclick="MovimUtils.reload('{$c->route('community', $server)}')">
  57. {$server}
  58. </a>
  59. {if="$num > 0"}
  60. <i class="material-symbols">article</i> {$num}
  61. {/if}
  62. {if="$info != null"}
  63. • <i class="material-symbols">people</i> {$info->occupants}
  64. {if="$info->description"}
  65. {$info->description|strip_tags}
  66. {/if}
  67. {else}
  68. {$server}
  69. {/if}
  70. </p>
  71. </div>
  72. </li>
  73. </ul>
  74. </header>