diff --git a/.env.example b/.env.example
index 0a71cacae..329465ffd 100644
--- a/.env.example
+++ b/.env.example
@@ -8,16 +8,22 @@
# Your local .env file is added to .gitignore and
# wont be uploaded to the repo.
-
-# database setup
+# Database setup
DATABASE_USER=postgres
DATABASE_NAME=timeoverflow_development
-# host part of the url for mail links:
+# Host part of the url for mail links:
MAIL_LINK_HOST=localhost:3000
MAIL_LINK_PROTO=http
-# a list of emails for superadmin users
+# Email provider
+SMTP_PASSWORD=XXXXXXXX
+SMTP_DOMAIN=www.timeoverflow.org
+SMTP_USER_NAME=my_username@timeoverflow.org
+SMTP_ADDRESS=smtp.mailgun.org
+SMTP_PORT=587
+
+# List of emails for superadmin users
ADMINS="admin@timeoverflow.org"
# AWS settings
diff --git a/README.md b/README.md
index c08cc6ea1..1479d11a2 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# TimeOverflow
-[![View performance data on Skylight](https://badges.skylight.io/problem/grDTNuzZRnyu.svg)](https://oss.skylight.io/app/applications/grDTNuzZRnyu)
+[![View performance data on Skylight](https://badges.skylight.io/typical/grDTNuzZRnyu.svg)](https://oss.skylight.io/app/applications/grDTNuzZRnyu)
[![Build Status](https://github.com/coopdevs/timeoverflow/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/coopdevs/timeoverflow/actions)
[![Maintainability](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/maintainability)](https://codeclimate.com/github/coopdevs/timeoverflow/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/test_coverage)](https://codeclimate.com/github/coopdevs/timeoverflow/test_coverage)
diff --git a/app/admin/category.rb b/app/admin/category.rb
index 9a80ac39d..aff173567 100644
--- a/app/admin/category.rb
+++ b/app/admin/category.rb
@@ -2,7 +2,7 @@
index do
id_column
column :name do |category|
- "#{tag.span(nil, class: "glyphicon glyphicon-#{category.icon_name}")} #{category.name}".html_safe
+ "#{category_icon(category)} #{category.name}".html_safe
end
actions
end
@@ -17,9 +17,12 @@
show do |cat|
attributes_table do
+ row :name do
+ "#{category_icon(cat)} #{cat.name}".html_safe
+ end
+ row :icon_name
row :created_at
row :updated_at
- row :icon_name
row :name_translations do
render_translations(cat.name_translations)
end
diff --git a/app/admin/dashboard.rb b/app/admin/dashboard.rb
index 647b6d254..410315912 100644
--- a/app/admin/dashboard.rb
+++ b/app/admin/dashboard.rb
@@ -2,6 +2,16 @@
menu priority: 1, label: proc { I18n.t("active_admin.dashboard") }
content title: proc { I18n.t("active_admin.dashboard") } do
+ columns do
+ panel "Global Stats", class: "global_stats_panel" do
+ div { "#{glyph(:home)} Time Banks #{Organization.count}".html_safe }
+ div { "#{glyph(:user)} Users #{User.count}".html_safe }
+ div { "#{glyph(:hand_up)} Offers #{Offer.count}".html_safe }
+ div { "#{glyph(:bell)} Inquiries #{Inquiry.count}".html_safe }
+ div { "#{glyph(:transfer)} Transfers #{Transfer.count}".html_safe }
+ end
+ end
+
columns do
column do
panel "Recent Organizations" do
@@ -32,6 +42,16 @@
end
end
end
+
+ column do
+ panel "Recent Petitions" do
+ ul do
+ Petition.last(5).map do |petition|
+ li "#{petition.user} #{glyph(:arrow_right)} #{petition.organization}".html_safe
+ end
+ end
+ end
+ end
end
end
end
diff --git a/app/admin/document.rb b/app/admin/document.rb
index 55c9d0fa8..778c53cef 100644
--- a/app/admin/document.rb
+++ b/app/admin/document.rb
@@ -20,7 +20,7 @@
render_translations(t.title_translations)
end
row :content_translations do
- render_translations(t.content_translations, "
")
+ render_translations(t.content_translations, "