diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss index c4fa6944e..577b8476f 100644 --- a/app/assets/stylesheets/foundation_and_overrides.scss +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -31,7 +31,6 @@ @include foundation-responsive-embed; @include foundation-label; @include foundation-media-object; -@include foundation-off-canvas; @include foundation-orbit; @include foundation-pagination; @include foundation-progress-bar; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 1118019f1..153bf1638 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -436,10 +436,6 @@ a { display: table-cell; } -.off-canvas-content { - box-shadow: none; -} - .uppercase { text-transform: uppercase; } @@ -450,21 +446,62 @@ a { } .menu-and-content { - display: flex; + $side-menu-min-width: 250px; - > :first-child { - flex: 25%; - min-width: 250px; + @include breakpoint(medium) { + display: flex; - > :first-child { - height: 100%; + > nav { + flex: 25%; + min-width: $side-menu-min-width; + + + * { + flex: 75%; + padding: $line-height !important; + } + } + + [for="show_menu"] { + display: none; } } - > :last-child { - flex: 75%; - overflow-x: auto; - padding: $line-height !important; + @include breakpoint(small only) { + > nav { + height: 100%; + left: -$side-menu-min-width; + overflow-y: auto; + position: fixed; + top: 0; + transition: left 0.5s ease; + width: $side-menu-min-width; + z-index: 12; + + + * { + padding: $line-height !important; + } + } + + [name="show_menu"]:checked + nav, + > nav:focus-within { + left: 0; + + + * { + overflow-x: hidden; + + [for="show_menu"]::after { + @include reveal-overlay; + content: ""; + cursor: pointer; + display: block; + z-index: 11; + } + } + } + } + + [name="show_menu"] { + display: none; } } diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 6c61c7e84..b7a85121c 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,281 +1,279 @@ -
-
+ <% end %> + + <% if feature?(:budgets) %> +
  • "> + <%= link_to admin_budgets_path do %> + + <%= t("admin.menu.budgets") %> + <% end %> +
  • + <% end %> + +
  • + + + <%= t("admin.menu.title_booths") %> + + +
  • + + <% if feature?(:signature_sheets) %> +
  • "> + <%= link_to admin_signature_sheets_path do %> + + <%= t("admin.menu.signature_sheets") %> + <% end %> +
  • + <% end %> + + <% messages_sections = %w[newsletters emails_download admin_notifications system_emails] %> + <% messages_menu_active = messages_sections.include?(controller_name) %> +
  • > + + + <%= t("admin.menu.messaging_users") %> + + +
  • + +
  • + + + <%= t("admin.menu.title_site_customization") %> + + +
  • + +
  • + + + <%= t("admin.menu.title_moderated_content") %> + + +
  • + +
  • + + + <%= t("admin.menu.title_profiles") %> + + +
  • + +
  • > + <%= link_to admin_stats_path do %> + <%= t("admin.menu.stats") %> + <% end %> +
  • + +
  • + + + <%= t("admin.menu.title_settings") %> + + +
  • +
  • + + + <%= t("admin.menu.dashboard") %> + + +
  • + diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index b4d0b39e6..edcb2288c 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -7,34 +7,22 @@ -
    -
    -
    + <%= render "layouts/admin_header" %> -
    - <%= side_menu %> -
    -
    + diff --git a/app/views/layouts/dashboard.html.erb b/app/views/layouts/dashboard.html.erb index a52e740e2..9e7786812 100644 --- a/app/views/layouts/dashboard.html.erb +++ b/app/views/layouts/dashboard.html.erb @@ -25,40 +25,23 @@

    <%= setting["org_name"] %>

    -
    -
    -
    -
    -
    - <%= render "dashboard/menu" %> -
    -
    -
    + <%= render "layouts/header", with_subnavigation: false %> -
    - <%= render "layouts/header", with_subnavigation: false %> +
    diff --git a/app/views/layouts/management.html.erb b/app/views/layouts/management.html.erb index a3dc288f9..b16d1778e 100644 --- a/app/views/layouts/management.html.erb +++ b/app/views/layouts/management.html.erb @@ -46,7 +46,7 @@
    -
    +
    <%= render "/management/menu" %>
    diff --git a/app/views/management/_menu.html.erb b/app/views/management/_menu.html.erb index 213e0ece4..2eb65d5b7 100644 --- a/app/views/management/_menu.html.erb +++ b/app/views/management/_menu.html.erb @@ -1,68 +1,66 @@ -
    -
      -
    • - - - <%= t("management.menu.users") %> - -
        +
          +
        • + + + <%= t("management.menu.users") %> + +
            -
          • > - <%= link_to t("management.menu.select_user"), management_document_verifications_path %> -
          • - - <% if managed_user.email %> -
          • > - <%= link_to t("management.account.menu.reset_password_email"), edit_password_email_management_account_path %> -
          • - <% end %> - -
          • > - <%= link_to t("management.account.menu.reset_password_manually"), edit_password_manually_management_account_path %> -
          • - -
          • > - <%= link_to t("management.menu.create_proposal"), new_management_proposal_path %> -
          • - -
          • > - <%= link_to t("management.menu.support_proposals"), management_proposals_path %> -
          • - - <% if Setting["process.budgets"] %> -
          • > - <%= link_to t("management.menu.create_budget_investment"), create_investments_management_budgets_path %> -
          • - -
          • > - <%= link_to t("management.menu.support_budget_investments"), support_investments_management_budgets_path %> -
          • - <% end %> +
          • > + <%= link_to t("management.menu.select_user"), management_document_verifications_path %>
          • -
          + + <% if managed_user.email %> +
        • > + <%= link_to t("management.account.menu.reset_password_email"), edit_password_email_management_account_path %> +
        • + <% end %> + +
        • > + <%= link_to t("management.account.menu.reset_password_manually"), edit_password_manually_management_account_path %> +
        • + +
        • > + <%= link_to t("management.menu.create_proposal"), new_management_proposal_path %> +
        • + +
        • > + <%= link_to t("management.menu.support_proposals"), management_proposals_path %> +
        • + + <% if Setting["process.budgets"] %> +
        • > + <%= link_to t("management.menu.create_budget_investment"), create_investments_management_budgets_path %> +
        • + +
        • > + <%= link_to t("management.menu.support_budget_investments"), support_investments_management_budgets_path %> +
        • + <% end %> +
        + - <% if Setting["process.budgets"] %> -
      • > - <%= link_to print_investments_management_budgets_path do %> - - <%= t("management.menu.print_budget_investments") %> - <% end %> -
      • + <% if Setting["process.budgets"] %> +
      • > + <%= link_to print_investments_management_budgets_path do %> + + <%= t("management.menu.print_budget_investments") %> + <% end %> +
      • + <% end %> + +
      • > + <%= link_to print_management_proposals_path do %> + + <%= t("management.menu.print_proposals") %> <% end %> +
      • -
      • > - <%= link_to print_management_proposals_path do %> - - <%= t("management.menu.print_proposals") %> - <% end %> -
      • - -
      • > - <%= link_to new_management_user_invite_path do %> - - <%= t("management.menu.user_invites") %> - <% end %> -
      • -
      -
    +
  • > + <%= link_to new_management_user_invite_path do %> + + <%= t("management.menu.user_invites") %> + <% end %> +
  • + diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb index 3437a731f..800b1551c 100644 --- a/app/views/moderation/_menu.html.erb +++ b/app/views/moderation/_menu.html.erb @@ -1,55 +1,53 @@ - + <% end %> + + <% if feature?(:debates) %> +
  • > + <%= link_to moderation_debates_path do %> + + <%= t("moderation.menu.flagged_debates") %> + <% end %> +
  • + <% end %> + + <% if feature?(:budgets) %> +
  • > + <%= link_to moderation_budget_investments_path do %> + + <%= t("moderation.menu.flagged_investments") %> + <% end %> +
  • + <% end %> + +
  • > + <%= link_to moderation_comments_path do %> + + <%= t("moderation.menu.flagged_comments") %> + <% end %> +
  • + +
  • > + <%= link_to moderation_users_path do %> + + <%= t("moderation.menu.users") %> + <% end %> +
  • +