Update ruby gems with vulnerabilities (#96)

* Bump color-string from 1.5.3 to 1.9.0 (#93)

Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.9.0.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.9.0)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ajv from 6.10.2 to 6.12.6 (#94)

Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update rails, devise and administrate gems

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Riccardo Graziosi
2022-03-23 21:29:54 +01:00
committed by GitHub
parent e7b73bcc1a
commit 74c6fa5651
6 changed files with 141 additions and 267 deletions

View File

@@ -16,12 +16,11 @@ as defined by the routes in the `admin/` namespace
"data-turbolinks": "false"
) %>
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
<% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
<%= link_to(
display_resource_name(resource),
[namespace, resource_index_route_key(resource)],
class: "navigation__link navigation__link--#{nav_link_state(resource)}",
style: "font-size: 15pt; text-decoration: none;"
) %>
resource_index_route(resource),
class: "navigation__link navigation__link--#{nav_link_state(resource)}"
) if valid_action?(:index, resource) && show_action?(:index, model_from_resource(resource)) %>
<% end %>
</nav>

View File

@@ -1,32 +0,0 @@
<%#
# Edit
This view is the template for the edit page.
It displays a header, and renders the `_form` partial to do the heavy lifting.
## Local variables:
- `page`:
An instance of [Administrate::Page::Form][1].
Contains helper methods to help display a form,
and knows which attributes should be displayed in the resource's form.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form
%>
<% content_for(:title) { t("administrate.actions.edit_resource", name: page.page_title) } %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
<div>
<%= link_to t("administrate.actions.back"), :back, class: "button" %>
</div>
</header>
<section class="main-content__body">
<%= render "form", page: page %>
</section>

View File

@@ -1,66 +0,0 @@
<%#
# Show
This view is the template for the show page.
It renders the attributes of a resource,
as well as a link to its edit page.
## Local variables:
- `page`:
An instance of [Administrate::Page::Show][1].
Contains methods for accessing the resource to be displayed on the page,
as well as helpers for describing how each attribute of the resource
should be displayed.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Show
%>
<% content_for(:title) { t("administrate.actions.show_resource", name: page.page_title) } %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
<div>
<%= link_to(
"Back to index",
[namespace, resource_index_route_key(page.resource_name)],
class: "button"
) %>
</div>
</header>
<section class="main-content__body">
<dl style="overflow: auto;">
<% page.attributes.each do |attribute| %>
<dt class="attribute-label" id="<%= attribute.name %>">
<%= t(
"helpers.label.#{resource_name}.#{attribute.name}",
default: attribute.name.titleize,
) %>
</dt>
<dd class="attribute-data attribute-data--<%=attribute.html_class%>"
><%= render_field attribute, page: page %></dd>
<% end %>
</dl>
<div>
<%= link_to(
"Edit",
[:edit, namespace, page.resource],
class: "button",
) if valid_action?(:edit) && show_action?(:edit, page.resource) %>
<%= link_to(
"Destroy",
[namespace, page.resource],
class: "button",
method: :delete,
data: { confirm: t("administrate.actions.confirm") },
style: "background-color: #d32f2f;"
) if valid_action?(:destroy) && show_action?(:destroy, page.resource) %>
</div>
</section>