forked from maybe-finance/marketing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
513 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Avo::Resources::Article < Avo::BaseResource | ||
self.includes = [] | ||
# self.search = { | ||
# query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } | ||
# } | ||
|
||
def fields | ||
field :id, as: :id | ||
field :title, as: :text | ||
field :slug, as: :text | ||
field :content, as: :textarea | ||
field :publish_at, as: :date_time | ||
field :author_name, as: :text | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class Avo::Resources::Term < Avo::BaseResource | ||
self.includes = [] | ||
# self.search = { | ||
# query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) } | ||
# } | ||
|
||
def fields | ||
field :id, as: :id | ||
field :name, as: :text | ||
field :title, as: :text | ||
field :content, as: :textarea | ||
field :slug, as: :text | ||
field :video_id, as: :text | ||
field :video_title, as: :text | ||
field :video_description, as: :textarea | ||
field :video_thumbnail_url, as: :text | ||
field :video_upload_date, as: :date | ||
field :video_duration, as: :text | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This controller has been generated to enable Rails' resource routes. | ||
# More information on https://docs.avohq.io/3.0/controllers.html | ||
class Avo::ArticlesController < Avo::ResourcesController | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This controller has been generated to enable Rails' resource routes. | ||
# More information on https://docs.avohq.io/3.0/controllers.html | ||
class Avo::TermsController < Avo::ResourcesController | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class User < ApplicationRecord | ||
include ReviseAuth::Model | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<p><%=t ".welcome", email: @user.unconfirmed_email %></p> | ||
|
||
<p><%=t ".confirm_below" %></p> | ||
|
||
<p><%= link_to t(".confirm"), profile_email_url(confirmation_token: @token) %></p> | ||
|
||
<p><%=t ".expiration_notice" %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<p><%=t ".reset_password_below" %></p> | ||
|
||
<p><%= link_to t(".reset_password"), edit_password_reset_url(token: @token) %></p> | ||
|
||
<p><%=t ".expiration_notice" %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<h1><%=t ".reset_password" %></h1> | ||
|
||
<%= form_with model: @user, url: password_reset_path do |form| %> | ||
<% if form.object.errors.any? %> | ||
<ul> | ||
<% form.object.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
|
||
<div> | ||
<%= form.label :password %> | ||
<%= form.password_field :password, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password_confirmation %> | ||
<%= form.password_field :password_confirmation, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".reset_password") %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<h1><%=t ".send_password_reset_instructions" %></h1> | ||
|
||
<%= form_with model: @user, url: password_resets_path do |form| %> | ||
<% if form.object.errors.any? %> | ||
<ul> | ||
<% form.object.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
|
||
<div> | ||
<%= form.label :email %> | ||
<%= form.email_field :email, required: true, autofocus: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".send_password_reset_instructions") %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render "revise_auth/shared/links" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<h1><%=t ".profile" %></h1> | ||
|
||
<%= form_with model: current_user, url: profile_email_path do |form| %> | ||
<fieldset> | ||
<legend><%=t ".change_email_address" %></legend> | ||
|
||
<% if current_user.unconfirmed_email? %> | ||
<p><%=t ".waiting_confirmation", email: current_user.unconfirmed_email %></p> | ||
<% end %> | ||
|
||
<% if form.object.errors.any? %> | ||
<ul> | ||
<% form.object.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
|
||
<p><%=t ".current_email_address", email: current_user.email %></p> | ||
<p><%=t ".confirmation_instructions" %></p> | ||
|
||
<div> | ||
<%= form.label :unconfirmed_email, t(".new_email") %> | ||
<%= form.email_field :unconfirmed_email, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".save") %> | ||
</div> | ||
</fieldset> | ||
<% end %> | ||
|
||
<%= form_with model: current_user, url: profile_password_path do |form| %> | ||
<fieldset> | ||
<legend><%=t ".change_password" %></legend> | ||
|
||
<% if form.object.errors.any? %> | ||
<ul> | ||
<% form.object.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
|
||
<div> | ||
<%= form.label :password_challenge %> | ||
<%= form.password_field :password_challenge, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password, t(".new_password") %> | ||
<%= form.password_field :password, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password_confirmation %> | ||
<%= form.password_field :password_confirmation, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".save") %> | ||
</div> | ||
</fieldset> | ||
<% end %> | ||
|
||
<%= form_with url: profile_path, method: :delete do |form| %> | ||
<fieldset> | ||
<legend><%=t ".delete_account" %></legend> | ||
<%= form.button t(".delete_account"), data: { turbo_confirm: t(".confirm") } %> | ||
</fieldset> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<h1><%=t ".sign_up" %></h1> | ||
|
||
<%= form_with model: @user, url: sign_up_path do |form| %> | ||
<% if form.object.errors.any? %> | ||
<ul> | ||
<% form.object.errors.full_messages.each do |message| %> | ||
<li><%= message %></li> | ||
<% end %> | ||
<% end %> | ||
|
||
</ul> | ||
<div> | ||
<%= form.label :email %> | ||
<%= form.email_field :email, required: true, autofocus: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password %> | ||
<%= form.password_field :password, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password_confirmation %> | ||
<%= form.password_field :password_confirmation, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".sign_up") %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render "revise_auth/shared/links" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h1><%=t ".log_in" %></h1> | ||
|
||
<%= form_with url: login_path do |form| %> | ||
<div> | ||
<%= form.label :email %> | ||
<%= form.email_field :email, required: true, autofocus: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.label :password %> | ||
<%= form.password_field :password, required: true %> | ||
</div> | ||
|
||
<div> | ||
<%= form.button t(".log_in") %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render "revise_auth/shared/links" %> |
Oops, something went wrong.