Skip to content
Snippets Groups Projects
Commit 4300b0fc authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Deployment status

parent 4ec37279
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites:
def website_params
attribute_names = [
:name, :url, :repository, :access_token, :about_type, :about_id, :in_production,
:git_provider, :git_endpoint, :git_branch, :plausible_url, language_ids: []
:git_provider, :git_endpoint, :git_branch, :plausible_url, :deployment_status_badge, language_ids: []
]
# For now, default language can't be changed, too many implications, especially around special pages.
attribute_names << :default_language_id unless @website&.persisted?
......
......@@ -19,6 +19,7 @@
<div class="col-xl-6">
<%= f.input :git_provider, include_blank: false %>
<%= f.input :git_endpoint %>
<%= f.input :deployment_status_badge, as: :string %>
</div>
<div class="col-xl-6">
<%= f.input :access_token %>
......
......@@ -16,6 +16,7 @@
<%= render 'admin/communication/websites/sidebar' do %>
<%= render 'admin/communication/websites/show/posts' if can? :read, Communication::Website::Post %>
<%= render 'admin/communication/websites/show/pages' if can? :read, Communication::Website::Page %>
<%= image_tag @website.deployment_status_badge, alt: '' if @website.deployment_status_badge.present? %>
<% end %>
<% content_for :action_bar_left do %>
......
......@@ -133,6 +133,7 @@ en:
access_token: Access token
created_at: Creation
default_language: Default language
deployment_status_badge: Deployment status badge
git_branch: Git branch
git_endpoint: Git endpoint
git_provider: Git provider
......
......@@ -133,6 +133,7 @@ fr:
access_token: Access token
created_at: Création
default_language: Langue par défaut
deployment_status_badge: Badge de statut du déploiement
git_branch: Branche
git_endpoint: Point d'accès Git
git_provider: Provider Git
......
class AddStatusToCommunicationWebsites < ActiveRecord::Migration[7.0]
def change
add_column :communication_websites, :deployment_status_badge, :text
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_07_03_142438) do
ActiveRecord::Schema[7.0].define(version: 2023_07_04_113222) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
......@@ -519,6 +519,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_03_142438) do
t.boolean "in_production", default: false
t.uuid "default_language_id", null: false
t.string "theme_version", default: "NA"
t.text "deployment_status_badge"
t.index ["about_type", "about_id"], name: "index_communication_websites_on_about"
t.index ["default_language_id"], name: "index_communication_websites_on_default_language_id"
t.index ["university_id"], name: "index_communication_websites_on_university_id"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment