mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add Site settings > General (#133)
This commit is contained in:
committed by
GitHub
parent
bdc4004e4a
commit
35831b9801
@@ -1,5 +1,9 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
<p><%= t('mailers.devise.welcome_greeting', { email: @email, site_name: Current.tenant_or_raise!.site_name }) %></p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
<p><%= t('mailers.devise.confirmation_instructions.body') %></p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
<p>
|
||||
<%= link_to t('mailers.devise.confirmation_instructions.action'),
|
||||
add_subdomain_to(method(:confirmation_url), @resource, { confirmation_token: @token })
|
||||
%>
|
||||
</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<p>Hello <%= @email %>!</p>
|
||||
<p><%= t('mailers.devise.opening_greeting', { email: @email }) %></p>
|
||||
|
||||
<% if @resource.try(:unconfirmed_email?) %>
|
||||
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
|
||||
<p><%= t('mailers.devise.email_changed.body', { email: @resource.unconfirmed_email }) %></p>
|
||||
<% else %>
|
||||
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
|
||||
<p><%= t('mailers.devise.email_changed.body', { email: @resource.email }) %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
<p><%= t('mailers.devise.opening_greeting', { email: @resource.email }) %></p>
|
||||
|
||||
<p>We're contacting you to notify you that your password has been changed.</p>
|
||||
<p><%= t('mailers.devise.password_change.body') %></p>
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
<p><%= t('mailers.devise.opening_greeting', { email: @resource.email }) %></p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
<p><%= t('mailers.devise.reset_password.body') %></p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
||||
<p>
|
||||
<%= link_to t('mailers.devise.reset_password.action'),
|
||||
add_subdomain_to(method(:edit_password_url), @resource, { reset_password_token: @token })
|
||||
%>
|
||||
</p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
<p><%= t('mailers.devise.reset_password.body2') %></p>
|
||||
<p><%= t('mailers.devise.reset_password.body3') %></p>
|
||||
|
||||
@@ -4,4 +4,8 @@
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
||||
<p>
|
||||
<%= link_to 'Unlock my account',
|
||||
add_subdomain_to(method(:unlock_url), @resource, { unlock_token: @token })
|
||||
%>
|
||||
</p>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<% if devise_mapping.rememberable? %>
|
||||
<div class="form-group form-check">
|
||||
<%= f.check_box :remember_me, class: "form-check-input" %>
|
||||
<%= f.label t('common.forms.auth.remember_me'), class: "form-check-label" %>
|
||||
<%= f.label :remember_me, t('common.forms.auth.remember_me'), class: "form-check-label" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -2,10 +2,16 @@
|
||||
<div class="container">
|
||||
<%=
|
||||
link_to root_path, class: 'brand' do
|
||||
app_name = content_tag :span, Rails.application.name
|
||||
logo = image_tag(asset_pack_path('media/images/logo.png'), class: 'logo')
|
||||
app_name = content_tag :span, @tenant.site_name
|
||||
logo = image_tag(@tenant.site_logo ? @tenant.site_logo : "", class: 'logo')
|
||||
|
||||
Rails.application.show_logo? ? logo + app_name : app_name
|
||||
if @tenant.brand_display_setting == "name_and_logo"
|
||||
logo + app_name
|
||||
elsif @tenant.brand_display_setting == "name_only"
|
||||
app_name
|
||||
elsif @tenant.brand_display_setting == "logo_only"
|
||||
logo
|
||||
end
|
||||
end
|
||||
%>
|
||||
|
||||
@@ -37,7 +43,7 @@
|
||||
<% if current_user.power_user? %>
|
||||
<%=
|
||||
link_to t('header.menu.site_settings'),
|
||||
current_user.admin? ? site_settings_boards_path : site_settings_users_path,
|
||||
current_user.admin? ? site_settings_general_path : site_settings_users_path,
|
||||
class: 'dropdown-item'
|
||||
%>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= Rails.application.name %></title>
|
||||
<title><%= @tenant ? @tenant.site_name : @page_title %></title>
|
||||
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
@@ -17,7 +18,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= render 'layouts/header' %>
|
||||
<% if @tenant %>
|
||||
<%= render 'layouts/header' %>
|
||||
<% end %>
|
||||
|
||||
<%= render 'layouts/alerts' %>
|
||||
|
||||
<div class="container">
|
||||
|
||||
@@ -4,14 +4,19 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<p><%= t('user_mailer.opening_greeting') %></p>
|
||||
<p><%= t('mailers.user.opening_greeting') %></p>
|
||||
|
||||
<div><%= yield %></div>
|
||||
|
||||
<p><%= t('user_mailer.closing_greeting') %></p>
|
||||
<p><%= t('mailers.user.closing_greeting') %></p>
|
||||
|
||||
<footer>
|
||||
<%= link_to(t('user_mailer.unsubscribe'), edit_user_registration_url) %>.
|
||||
<%=
|
||||
link_to(
|
||||
t('mailers.user.unsubscribe'),
|
||||
add_subdomain_to(method(:edit_user_registration_url))
|
||||
)
|
||||
%>.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<div class="verticalNavigation" role="tablist" aria-orientation="vertical">
|
||||
<% if current_user.admin? %>
|
||||
<%= render 'menu_link', label: t('site_settings.menu.general'), path: site_settings_general_path %>
|
||||
<%= render 'menu_link', label: t('site_settings.menu.boards'), path: site_settings_boards_path %>
|
||||
<%= render 'menu_link', label: t('site_settings.menu.post_statuses'), path: site_settings_post_statuses_path %>
|
||||
<%= render 'menu_link', label: t('site_settings.menu.roadmap'), path: site_settings_roadmap_path %>
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
<div class="twoColumnsContainer">
|
||||
<%= render 'menu' %>
|
||||
|
||||
<div class="content">
|
||||
<h2>General</h2>
|
||||
<p>Under construction</p>
|
||||
<div>
|
||||
<%=
|
||||
react_component(
|
||||
'SiteSettings/General',
|
||||
{
|
||||
originForm: {
|
||||
siteName: @tenant.site_name,
|
||||
siteLogo: @tenant.site_logo,
|
||||
brandDisplaySetting: @tenant.brand_display_setting,
|
||||
locale: @tenant.locale
|
||||
},
|
||||
authenticityToken: form_authenticity_token
|
||||
}
|
||||
)
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
5
app/views/static_pages/blocked_tenant.html.erb
Normal file
5
app/views/static_pages/blocked_tenant.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="smallContainer">
|
||||
<div class="box">
|
||||
<h3><%= t('blocked_tenant.title') %></h3>
|
||||
</div>
|
||||
</div>
|
||||
6
app/views/static_pages/pending_tenant.html.erb
Normal file
6
app/views/static_pages/pending_tenant.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="smallContainer">
|
||||
<div class="box">
|
||||
<h3><%= t('pending_tenant.title') %></h3>
|
||||
<p><%= t('pending_tenant.message') %></p>
|
||||
</div>
|
||||
</div>
|
||||
8
app/views/tenants/new.html.erb
Normal file
8
app/views/tenants/new.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<%=
|
||||
react_component(
|
||||
'TenantSignUp',
|
||||
{
|
||||
authenticityToken: form_authenticity_token
|
||||
}
|
||||
)
|
||||
%>
|
||||
@@ -1,5 +1,5 @@
|
||||
<p>
|
||||
<%= t('user_mailer.notify_comment_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
<%= t('mailers.user.notify_comment_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -7,5 +7,5 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to t('user_mailer.learn_more'), post_url(@comment.post) %>
|
||||
<%= link_to t('mailers.user.learn_more'), add_subdomain_to(method(:post_url), @comment.post) %>
|
||||
</p>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<p>
|
||||
<%= I18n.t('user_mailer.notify_followers_of_post_status_change.body', { post: @post }) %>
|
||||
<span style='background-color: <%= @post.post_status.color %>; color: white;'%>>
|
||||
<%= @post.post_status.name %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to I18n.t('user_mailer.learn_more'), post_url(@post) %>
|
||||
</p>
|
||||
@@ -0,0 +1,10 @@
|
||||
<p>
|
||||
<%= t('mailers.user.notify_followers_of_post_status_change.body', { post: @post }) %>
|
||||
<span style='background-color: <%= @post.post_status.color %>; color: white;'%>>
|
||||
<%= @post.post_status.name %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to t('mailers.user.learn_more'), add_subdomain_to(method(:post_url), @post) %>
|
||||
</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
<p>
|
||||
<%= I18n.t('user_mailer.notify_followers_of_post_update.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<i><%= @comment.body %></i>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to I18n.t('user_mailer.learn_more'), post_url(@comment.post) %>
|
||||
</p>
|
||||
@@ -0,0 +1,11 @@
|
||||
<p>
|
||||
<%= t('mailers.user.notify_followers_of_post_update.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<i><%= @comment.body %></i>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to t('mailers.user.learn_more'), add_subdomain_to(method(:post_url), @comment.post) %>
|
||||
</p>
|
||||
@@ -1,5 +1,5 @@
|
||||
<p>
|
||||
<%= t('user_mailer.notify_post_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
<%= t('mailers.user.notify_post_owner.body', { user: @comment.user.full_name, post: @comment.post.title }) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -7,5 +7,5 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to t('user_mailer.learn_more'), post_url(@comment.post) %>
|
||||
<%= link_to t('mailers.user.learn_more'), add_subdomain_to(method(:post_url), @comment.post) %>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user