src/Cms/ContainerBundle/Resources/views/Dashboard/index.html.twig line 1

Open in your IDE?
  1. {% extends '@ui/dashboards/default.html.twig' %}
  2. {% block content %}
  3.     {% if announcements|length > 0 %}
  4.         <div class="row">
  5.             <div class="col-md-12">
  6.                 {% for announcement in announcements %}
  7.                     <div class="system-alert {% if announcement.state in 'danger' %}system-alert--danger{% elseif announcement.state in 'warning' %}system-alert--warning{% elseif announcement.state in 'info' %}system-alert--info{% else %}system-alert--success{% endif %}">
  8.                         <div class="system-alert__body">
  9.                             {% if not (announcement.title starts with 'hideme') %}
  10.                             <h4 class="system-alert__heading">{{ announcement.title }}</h4>
  11.                             {% endif %}
  12.                             <div class="system-alert__desc">{{ announcement.description|raw }}</div>
  13.                         </div>
  14.                     </div>
  15.                 {% endfor %}
  16.             </div>
  17.         </div>
  18.     {% endif %}
  19.     <div class="row">
  20.         <div class="col-md-8">
  21.             {% if favorites|length > 0 %}
  22.                 {% embed '@ui/common/panels/default.html.twig' with {
  23.                     title: 'Favorites',
  24.                     collapsible: true
  25.                 } %}
  26.                     {% block body %}
  27.                         {% embed '@ui/common/lists/modules.html.twig' with {
  28.                             classes: 'module-list--dash-depts',
  29.                         } %}
  30.                             {% block items %}
  31.                                 {% for favorite in favorites %}
  32.                                     {% embed '@ui/common/lists/items/modules.html.twig' with {
  33.                                         title: '<a href="%s">%s</a>'|format(
  34.                                             containerUrl(
  35.                                                 favorite,
  36.                                                 app.user.uid.toString()
  37.                                             ),
  38.                                             favorite.name|escape
  39.                                         ),
  40.                                         actions: [
  41.                                             {
  42.                                                 text: 'Manage',
  43.                                                 icon: 'icon icon-lined-folder-front-b',
  44.                                                 link: path(routes.container__view, {
  45.                                                     containerId: favorite.id
  46.                                                 }),
  47.                                                 classes: 'actions-li__link--borderless',
  48.                                             },
  49.                                         ],
  50.                                     } %}{% endembed %}
  51.                                 {% endfor %}
  52.                             {% endblock %}
  53.                         {% endembed %}
  54.                     {% endblock %}
  55.                 {% endembed %}
  56.             {% endif %}
  57.             {% if personalSites|length > 0 %}
  58.                 {% embed '@ui/common/panels/default.html.twig' with {
  59.                     title: 'Teacher Websites',
  60.                     collapsible: true
  61.                 } %}
  62.                     {% block body %}
  63.                         {% embed '@ui/common/lists/modules.html.twig' with {
  64.                             classes: 'module-list--dash-depts',
  65.                         } %}
  66.                             {% block items %}
  67.                                 {% for site in personalSites %}
  68.                                     {% embed '@ui/common/lists/items/modules.html.twig' with {
  69.                                         title: '<a href="%s">%s</a>'|format(
  70.                                             containerUrl(
  71.                                                 site,
  72.                                                 app.user.uid.toString()
  73.                                             ),
  74.                                             site.name|escape
  75.                                         ),
  76.                                         actions: [
  77.                                             {
  78.                                                 text: 'Manage',
  79.                                                 icon: 'icon icon-lined-folder-front-b',
  80.                                                 link: path(routes.container__view, {
  81.                                                     containerId: site.id
  82.                                                 }),
  83.                                                 classes: 'actions-li__link--borderless',
  84.                                             },
  85.                                         ],
  86.                                     } %}{% endembed %}
  87.                                 {% endfor %}
  88.                             {% endblock %}
  89.                         {% endembed %}
  90.                     {% endblock %}
  91.                 {% endembed %}
  92.             {% endif %}
  93.             {% if sites|length > 0 %}
  94.                 {% embed '@ui/common/panels/default.html.twig' with {
  95.                     title: 'Websites',
  96.                     collapsible: true
  97.                 } %}
  98.                     {% block body %}
  99.                         {% embed '@ui/common/lists/modules.html.twig' with {
  100.                             classes: 'module-list--dash-depts',
  101.                         } %}
  102.                             {% block items %}
  103.                                 {% for site in sites %}
  104.                                     {% embed '@ui/common/lists/items/modules.html.twig' with {
  105.                                         title: '<a href="%s">%s</a>'|format(
  106.                                             containerUrl(
  107.                                                 site,
  108.                                                 app.user.uid.toString()
  109.                                             ),
  110.                                             site.name|escape
  111.                                         ),
  112.                                         actions: [
  113.                                             {
  114.                                                 text: 'Manage',
  115.                                                 icon: 'icon icon-lined-folder-front-b',
  116.                                                 link: path(routes.container__view, {
  117.                                                     containerId: site.id
  118.                                                 }),
  119.                                                 classes: 'actions-li__link--borderless',
  120.                                             },
  121.                                         ],
  122.                                     } %}{% endembed %}
  123.                                 {% endfor %}
  124.                             {% endblock %}
  125.                         {% endembed %}
  126.                     {% endblock %}
  127.                 {% endembed %}
  128.             {% endif %}
  129.             {% if intranets|length > 0 %}
  130.                 {% embed '@ui/common/panels/default.html.twig' with {
  131.                     title: 'Intranets',
  132.                     collapsible: true
  133.                 } %}
  134.                     {% block body %}
  135.                         {% embed '@ui/common/lists/modules.html.twig' with {
  136.                             classes: 'module-list--dash-depts',
  137.                         } %}
  138.                             {% block items %}
  139.                                 {% for intranet in intranets %}
  140.                                     {% embed '@ui/common/lists/items/modules.html.twig' with {
  141.                                         title: '<a href="%s">%s</a>'|format(
  142.                                             containerUrl(
  143.                                                 intranet,
  144.                                                 app.user.uid.toString()
  145.                                             ),
  146.                                             intranet.name|escape
  147.                                         ),
  148.                                         actions: [],
  149.                                     } %}{% endembed %}
  150.                                 {% endfor %}
  151.                             {% endblock %}
  152.                         {% endembed %}
  153.                     {% endblock %}
  154.                 {% endembed %}
  155.             {% endif %}
  156.         </div>
  157.         <div class="col-md-4">
  158.             {% include '@PlatformMarketing/Dashboard/Default/includes/hubspot_frame.html.twig' with {
  159.                 src: 'https://617533.hs-sites.com/website-cms-right-panel',
  160.                 autoHeight: true
  161.             } %}
  162.         </div>
  163.     </div>
  164. {% endblock %}