diff --git a/html/modules/custom/reliefweb_user_posts/src/Form/UserPostsPageFilterForm.php b/html/modules/custom/reliefweb_user_posts/src/Form/UserPostsPageFilterForm.php index ec079f5b9..cece24eab 100644 --- a/html/modules/custom/reliefweb_user_posts/src/Form/UserPostsPageFilterForm.php +++ b/html/modules/custom/reliefweb_user_posts/src/Form/UserPostsPageFilterForm.php @@ -30,7 +30,7 @@ public function buildForm(array $form, FormStateInterface $form_state, ?Moderati // Link to create a new entity. $url_options = ['attributes' => ['target' => '_blank']]; - if ($user && $user->hasRole('contributor')) { + if ($user && $user->hasPermission('create report content')) { $links = $this->t('Create a new Job vacancy, a new Training program or a new Report', [ '@job_url' => Url::fromRoute('node.add', [ 'node_type' => 'job', diff --git a/html/themes/custom/common_design_subtheme/components/rw-user/rw-user.css b/html/themes/custom/common_design_subtheme/components/rw-user/rw-user.css index 573570694..67dbf4496 100644 --- a/html/themes/custom/common_design_subtheme/components/rw-user/rw-user.css +++ b/html/themes/custom/common_design_subtheme/components/rw-user/rw-user.css @@ -52,6 +52,7 @@ } .rw-user-dashboard li + li { margin-top: 32px; + break-inside: avoid; } [dir="ltr"] .rw-user-dashboard li { padding-right: 32px; diff --git a/html/themes/custom/common_design_subtheme/templates/user/user.html.twig b/html/themes/custom/common_design_subtheme/templates/user/user.html.twig index 8027abb72..a01c893ed 100644 --- a/html/themes/custom/common_design_subtheme/templates/user/user.html.twig +++ b/html/themes/custom/common_design_subtheme/templates/user/user.html.twig @@ -36,14 +36,24 @@ {% trans %}Manage your bookmarks{% endtrans %}

{% trans %}Track content relevant to you on the site.{% endtrans %}

+ {% if user.hasPermission('create job content') %}
  • {% trans %}Post a job vacancy{% endtrans %}

    {% trans %}Advertise job, consulting and internships vacancies.{% endtrans %}

  • + {% if user.hasPermission('create training content') %} + {% endif %}
  • {% trans %}Post a training program{% endtrans %}

    {% trans %}Advertise training programs for the humanitarian community.{% endtrans %}

  • + {% endif %} + {% if user.hasPermission('create report content') %} +
  • + {% trans %}Post a report{% endtrans %} +

    {% trans %}Post a report for the humanitarian community.{% endtrans %}

    +
  • + {% endif %}
  • {% trans %}View your posts{% endtrans %}

    {% trans %}Manage the Job vacancies or Training programs you posted.{% endtrans %}