Files
astuto/app/views/layouts/_header.html.erb

72 lines
2.7 KiB
Plaintext
Raw Normal View History

<nav class="header">
2019-08-19 16:43:32 +02:00
<div class="container">
2019-09-23 17:06:32 +02:00
<%=
link_to root_path, class: 'brand' do
2022-07-18 10:47:54 +02:00
app_name = content_tag :span, @tenant.site_name
logo = image_tag(@tenant.site_logo ? @tenant.site_logo : "", class: 'logo', skip_pipeline: true)
2019-09-24 16:37:55 +02:00
if @tenant_setting.brand_display == "name_and_logo"
2022-07-18 10:47:54 +02:00
logo + app_name
elsif @tenant_setting.brand_display == "name_only"
2022-07-18 10:47:54 +02:00
app_name
elsif @tenant_setting.brand_display == "logo_only"
2022-07-18 10:47:54 +02:00
logo
end
2019-09-23 17:06:32 +02:00
end
%>
<button
class="navbarToggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
2019-08-19 16:43:32 +02:00
<span class="navbar-toggler-icon"></span>
</button>
2019-08-19 16:43:32 +02:00
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="boardsNav">
<% if @tenant_setting.show_roadmap_in_header %>
Bump yarn packages (webpacker, bootstrap, ...) (#222) * Specify exact versions in package.json * Bump @rails packages to 6.1.7-3 * Bump decode-uri-component from 0.2.0 to 0.2.2 (#176) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump qs from 6.5.2 to 6.5.3 (#177) Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump express from 4.17.1 to 4.18.2 (#178) Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump json5 from 1.0.1 to 1.0.2 (#182) Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump minimatch from 3.0.4 to 3.0.8 (#223) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.0.8. - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.0.8) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @rails/webpacker to 5.1.0 * Fix translations import in application.js * Bump @rails/webpacker to 5.4.4 * Set some babel plugins loose=true to suppress warnings * Bump boostrap to 4.6.2 and popper.js to 1.16.1 * Fix CSS after bootstrap bump --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-13 18:41:26 +02:00
<li class="nav-item<%= (current_page?(roadmap_path) or (@tenant_setting.root_board_id == 0 and current_page?(root_path))) ? ' active' : '' %>">
2024-01-08 23:13:39 +07:00
<%= link_to t('roadmap.title'), roadmap_path, class: 'nav-link' %>
</li>
<% end %>
<%= render 'layouts/boards_nav_section', boards: @boards unless @boards.nil? %>
2019-08-22 17:09:13 +02:00
</ul>
<ul class="profileNav">
2019-08-19 16:43:32 +02:00
<% if user_signed_in? %>
<li class="nav-item dropdown">
<a class="profileToggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<%= image_tag(current_user.gravatar_url, class: 'gravatar', alt: current_user.full_name, size: 24) %>
2019-08-19 17:42:13 +02:00
<span class="fullname"><%= current_user.full_name %></span>
2019-08-19 16:43:32 +02:00
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
2023-01-18 21:11:27 +01:00
<% if current_user.moderator? %>
<%=
link_to t('header.menu.site_settings'),
2022-07-18 10:47:54 +02:00
current_user.admin? ? site_settings_general_path : site_settings_users_path,
class: 'dropdown-item'
%>
2022-05-01 18:00:38 +02:00
<div class="dropdown-divider"></div>
<% end %>
<%= link_to t('header.menu.profile_settings'), edit_user_registration_path, class: 'dropdown-item' %>
2019-08-19 16:43:32 +02:00
<div class="dropdown-divider"></div>
<%= button_to t('header.menu.sign_out'), destroy_user_session_path, method: :delete, class: 'dropdown-item' %>
2019-08-19 16:43:32 +02:00
</div>
</li>
<% else %>
<li class="nav-item">
<%= link_to t('header.log_in'), new_user_session_path, class: 'nav-link' %>
2019-08-19 16:43:32 +02:00
</li>
<% end %>
</ul>
</div>
</div>
</nav>