From 3ac179e622b11e686d007e097e54ba1c937a7122 Mon Sep 17 00:00:00 2001 From: magicmarie Date: Mon, 23 Jul 2018 15:56:24 +0300 Subject: [PATCH 1/4] =?UTF-8?q?Feature=20User=20needs=20a=20help=20center?= =?UTF-8?q?=20with=20FAQ=E2=80=99s,=20help=20videos,=20live=20chat=20This?= =?UTF-8?q?=20commit=20adds=20a=20help=20center=20tab=20on=20the=20dashboa?= =?UTF-8?q?rd=20that=20has=20videos=20and=20FAQs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0011_auto_20180719_1857.py | 20 +++++++++ hc/api/admin.py | 31 +++++++++++++- hc/api/migrations/0051_auto_20180719_1857.py | 42 +++++++++++++++++++ hc/api/migrations/0052_auto_20180723_1254.py | 20 +++++++++ hc/api/models.py | 11 +++++ .../tests/test_sendalerts_until_resolved.py | 2 + hc/front/tests/test_help_center.py | 17 ++++++++ hc/front/urls.py | 2 + hc/front/views.py | 32 ++++++++++++++ hc/settings.py | 2 +- hc/urls.py | 2 +- templates/base.html | 18 ++++++++ templates/front/faqs.html | 28 +++++++++++++ templates/front/help_videos.html | 32 ++++++++++++++ templates/front/welcome.html | 11 +++++ 15 files changed, 267 insertions(+), 3 deletions(-) create mode 100644 hc/accounts/migrations/0011_auto_20180719_1857.py create mode 100644 hc/api/migrations/0051_auto_20180719_1857.py create mode 100644 hc/api/migrations/0052_auto_20180723_1254.py create mode 100644 hc/front/tests/test_help_center.py create mode 100644 templates/front/faqs.html create mode 100644 templates/front/help_videos.html diff --git a/hc/accounts/migrations/0011_auto_20180719_1857.py b/hc/accounts/migrations/0011_auto_20180719_1857.py new file mode 100644 index 00000000..7aa3de57 --- /dev/null +++ b/hc/accounts/migrations/0011_auto_20180719_1857.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-19 18:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0010_merge_20180714_0612'), + ] + + operations = [ + migrations.AlterField( + model_name='profile', + name='report_frequency', + field=models.CharField(default='month', max_length=20), + ), + ] diff --git a/hc/api/admin.py b/hc/api/admin.py index 5fe780ce..5540a700 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.paginator import Paginator from django.db import connection -from hc.api.models import Channel, Check, Notification, Ping +from hc.api.models import Channel, Check, Notification, Ping, Faq, Video class OwnershipListFilter(admin.SimpleListFilter): @@ -200,3 +200,32 @@ def channel_kind(self, obj): def channel_value(self, obj): return obj.channel.value + + +@admin.register(Video) +class VideoAdmin(admin.ModelAdmin): + + class Media: + css = { + 'all': ('css/admin/checks.css',) + } + + search_fields = ["header"] + list_display = ("id", "header", "description", "video_link") + list_filter = ["header"] + list_display_links = ('id', 'header') + + +@admin.register(Faq) +class FaqAdmin(admin.ModelAdmin): + + class Media: + css = { + 'all': ('css/admin/checks.css',) + } + + search_fields = ["question", "answer"] + list_display = ("id", "question", "answer") + + list_filter = ["question", "answer"] + list_display_links = ("id", "question") diff --git a/hc/api/migrations/0051_auto_20180719_1857.py b/hc/api/migrations/0051_auto_20180719_1857.py new file mode 100644 index 00000000..cfee42fe --- /dev/null +++ b/hc/api/migrations/0051_auto_20180719_1857.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-19 18:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0050_merge_20180716_0922'), + ] + + operations = [ + migrations.CreateModel( + name='Faq', + fields=[ + ('id', models.AutoField(auto_created=True, + primary_key=True, serialize=False, + verbose_name='ID')), + ('question', models.TextField(blank=True)), + ('answer', models.TextField(blank=True)), + ], + ), + migrations.CreateModel( + name='Video', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, + serialize=False, verbose_name='ID')), + ('header', models.TextField(blank=True)), + ('description', models.TextField(blank=True)), + ('video_link', models.URLField( + help_text='https://www.youtube.com/watch?v=5sMKX22BHeEM')), + ], + ), + migrations.AlterField( + model_name='check', + name='twilio_number', + field=models.TextField( + blank=True, default='+00000000000', null=True), + ), + ] diff --git a/hc/api/migrations/0052_auto_20180723_1254.py b/hc/api/migrations/0052_auto_20180723_1254.py new file mode 100644 index 00000000..a300724a --- /dev/null +++ b/hc/api/migrations/0052_auto_20180723_1254.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-23 12:54 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0051_auto_20180719_1857'), + ] + + operations = [ + migrations.AlterField( + model_name='video', + name='video_link', + field=models.URLField(), + ), + ] diff --git a/hc/api/models.py b/hc/api/models.py index 3312ed7a..4f42bb1c 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -306,3 +306,14 @@ class Meta: channel = models.ForeignKey(Channel) created = models.DateTimeField(auto_now_add=True) error = models.CharField(max_length=200, blank=True) + + +class Faq(models.Model): + question = models.TextField(blank=True, null=False) + answer = models.TextField(blank=True, null=False) + + +class Video(models.Model): + header = models.TextField(blank=True, null=False) + description = models.TextField(blank=True, null=False) + video_link = models.URLField(blank=False, null=False) diff --git a/hc/api/tests/test_sendalerts_until_resolved.py b/hc/api/tests/test_sendalerts_until_resolved.py index ca2da44b..82b6d196 100644 --- a/hc/api/tests/test_sendalerts_until_resolved.py +++ b/hc/api/tests/test_sendalerts_until_resolved.py @@ -23,3 +23,5 @@ def test_it_handles_unresolved(self, mock): result = Command().handle_many() self.assertEqual(result, True) + + # def test_set_priority_level(self) diff --git a/hc/front/tests/test_help_center.py b/hc/front/tests/test_help_center.py new file mode 100644 index 00000000..8102f29b --- /dev/null +++ b/hc/front/tests/test_help_center.py @@ -0,0 +1,17 @@ +from hc.test import BaseTestCase +from django.urls import reverse + + +class HelpCenterTestCase(BaseTestCase): + def setUp(self): + super(HelpCenterTestCase, self).setUp() + + def test_faq_works(self): + self.client.login(username="alice@example.org", password="password") + response = self.client.get(reverse("hc-faqs")) + self.assertEqual(response.status_code, 200) + + def test_help_videos_work(self): + self.client.login(username="alice@example.org", password="password") + response = self.client.get(reverse("hc-help-videos")) + self.assertEqual(response.status_code, 200) diff --git a/hc/front/urls.py b/hc/front/urls.py index 81657df0..0a9c6e7b 100644 --- a/hc/front/urls.py +++ b/hc/front/urls.py @@ -52,4 +52,6 @@ url(r'^about/$', views.about, name="hc-about"), url(r'^privacy/$', views.privacy, name="hc-privacy"), url(r'^terms/$', views.terms, name="hc-terms"), + url(r'^faqs/$', views.faq, name="hc-faqs"), + url(r'^help_videos/$', views.help_videos, name="hc-help-videos"), ] diff --git a/hc/front/views.py b/hc/front/views.py index ea8abf22..1ff2b64d 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -14,6 +14,7 @@ from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlencode from hc.api.decorators import uuid_or_400 +<<<<<<< HEAD from hc.api.models import DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, Ping from hc.front.forms import (AddChannelForm, AddWebhookForm, @@ -23,6 +24,12 @@ ShopifyForm, PriorityForm) import shopify +======= +from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, + Ping, Video, Faq) +from hc.front.forms import (AddChannelForm, AddWebhookForm, NameTagsForm, + TimeoutForm, NagIntervalForm, PriorityForm) +>>>>>>> Feature User needs a help center with FAQ’s, help videos, live chat # from itertools recipes: @@ -713,6 +720,7 @@ def terms(request): @login_required +<<<<<<< HEAD def unresolved_checks(request): """function for unresolved jobs tab with jobs that are down""" checks = list( @@ -733,3 +741,27 @@ def unresolved_checks(request): } return render(request, "front/unresolved_checks.html", ctx) +======= +def help_videos(request): + q = Video.objects.order_by("id") + videos = list(q) + + ctx = { + "page": "help_videos", + "help_videos": videos + } + + return render(request, "front/help_videos.html", ctx) + + +@login_required +def faq(request): + q = Faq.objects.order_by("id") + faqs = list(q) + + ctx = { + "page": "faqs", + "faqs": faqs + } + return render(request, "front/faqs.html", ctx) +>>>>>>> Feature User needs a help center with FAQ’s, help videos, live chat diff --git a/hc/settings.py b/hc/settings.py index eb6586bb..c4bdacb3 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -41,7 +41,7 @@ 'hc.accounts', 'hc.api', 'hc.front', - 'hc.payments' + 'hc.payments', ) diff --git a/hc/urls.py b/hc/urls.py index 12c23c67..8ad7edbf 100644 --- a/hc/urls.py +++ b/hc/urls.py @@ -6,5 +6,5 @@ url(r'^accounts/', include('hc.accounts.urls')), url(r'^', include('hc.api.urls')), url(r'^', include('hc.front.urls')), - url(r'^', include('hc.payments.urls')) + url(r'^', include('hc.payments.urls')), ] diff --git a/templates/base.html b/templates/base.html index 51ea0a76..0fb8f319 100644 --- a/templates/base.html +++ b/templates/base.html @@ -110,6 +110,24 @@
  • About
  • + {% if request.user.is_authenticated %} + + {% endif %} diff --git a/templates/front/faqs.html b/templates/front/faqs.html new file mode 100644 index 00000000..8d32ebf8 --- /dev/null +++ b/templates/front/faqs.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% load staticfiles %} +{% block title %}FAQs - healthchecks.io{% endblock %} +{% block content %} +
    +
    +

    Frequently Asked Questions

    +
    + {% if faqs %} + {% for faq in faqs %} +
    + +
    +
    {{ faq.answer }}
    +
    +
    + {% endfor %} + {% else %} +
    No FAQs available.
    + {% endif %} +
    +
    +
    +{% endblock %} \ No newline at end of file diff --git a/templates/front/help_videos.html b/templates/front/help_videos.html new file mode 100644 index 00000000..7ad96892 --- /dev/null +++ b/templates/front/help_videos.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block title %}Help Center - healthchecks.io{% endblock %} + +{% block content %} +
    +
    + +

    Welcome to the help videos

    +

    + Healthchecks.io is an open source project on + GitHub +

    +
    +
    + {% if help_videos %} + {% for help_video in help_videos %} +

    {{ help_video.header }}

    +

    {{ help_video.description }}

    + + {% endfor %} + {% else %} +
    There are currently no videos available.
    + {% endif %} +
    +
    + +
    +
    +{% endblock %} \ No newline at end of file diff --git a/templates/front/welcome.html b/templates/front/welcome.html index 2e9bd908..65605d78 100644 --- a/templates/front/welcome.html +++ b/templates/front/welcome.html @@ -334,6 +334,17 @@

    A quick peek of what's inside:

    + + + {% endcompress %} {% endblock %} From 20d7e8dee1bd28dcf8667035e7e57695d33f4251 Mon Sep 17 00:00:00 2001 From: magicmarie Date: Mon, 23 Jul 2018 15:56:24 +0300 Subject: [PATCH 2/4] =?UTF-8?q?Feature=20User=20needs=20a=20help=20center?= =?UTF-8?q?=20with=20FAQ=E2=80=99s,=20help=20videos,=20live=20chat=20This?= =?UTF-8?q?=20commit=20adds=20a=20help=20center=20tab=20on=20the=20dashboa?= =?UTF-8?q?rd=20that=20has=20videos=20and=20FAQs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0011_auto_20180719_1857.py | 20 +++++++++ .../migrations/0012_merge_20180723_1342.py | 16 +++++++ hc/api/admin.py | 31 +++++++++++++- hc/api/migrations/0051_auto_20180719_1857.py | 42 +++++++++++++++++++ hc/api/migrations/0052_auto_20180723_1254.py | 20 +++++++++ hc/api/migrations/0053_merge_20180723_1342.py | 16 +++++++ hc/api/models.py | 11 +++++ .../tests/test_sendalerts_until_resolved.py | 2 + hc/front/tests/test_help_center.py | 17 ++++++++ hc/front/urls.py | 2 + hc/front/views.py | 28 ++++++++++++- hc/settings.py | 2 +- hc/urls.py | 2 +- templates/base.html | 18 ++++++++ templates/front/faqs.html | 28 +++++++++++++ templates/front/help_videos.html | 32 ++++++++++++++ templates/front/welcome.html | 11 +++++ 17 files changed, 294 insertions(+), 4 deletions(-) create mode 100644 hc/accounts/migrations/0011_auto_20180719_1857.py create mode 100644 hc/accounts/migrations/0012_merge_20180723_1342.py create mode 100644 hc/api/migrations/0051_auto_20180719_1857.py create mode 100644 hc/api/migrations/0052_auto_20180723_1254.py create mode 100644 hc/api/migrations/0053_merge_20180723_1342.py create mode 100644 hc/front/tests/test_help_center.py create mode 100644 templates/front/faqs.html create mode 100644 templates/front/help_videos.html diff --git a/hc/accounts/migrations/0011_auto_20180719_1857.py b/hc/accounts/migrations/0011_auto_20180719_1857.py new file mode 100644 index 00000000..7aa3de57 --- /dev/null +++ b/hc/accounts/migrations/0011_auto_20180719_1857.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-19 18:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0010_merge_20180714_0612'), + ] + + operations = [ + migrations.AlterField( + model_name='profile', + name='report_frequency', + field=models.CharField(default='month', max_length=20), + ), + ] diff --git a/hc/accounts/migrations/0012_merge_20180723_1342.py b/hc/accounts/migrations/0012_merge_20180723_1342.py new file mode 100644 index 00000000..34ac4d87 --- /dev/null +++ b/hc/accounts/migrations/0012_merge_20180723_1342.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-23 13:42 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0011_merge_20180716_1253'), + ('accounts', '0011_auto_20180719_1857'), + ] + + operations = [ + ] diff --git a/hc/api/admin.py b/hc/api/admin.py index 5fe780ce..5540a700 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.paginator import Paginator from django.db import connection -from hc.api.models import Channel, Check, Notification, Ping +from hc.api.models import Channel, Check, Notification, Ping, Faq, Video class OwnershipListFilter(admin.SimpleListFilter): @@ -200,3 +200,32 @@ def channel_kind(self, obj): def channel_value(self, obj): return obj.channel.value + + +@admin.register(Video) +class VideoAdmin(admin.ModelAdmin): + + class Media: + css = { + 'all': ('css/admin/checks.css',) + } + + search_fields = ["header"] + list_display = ("id", "header", "description", "video_link") + list_filter = ["header"] + list_display_links = ('id', 'header') + + +@admin.register(Faq) +class FaqAdmin(admin.ModelAdmin): + + class Media: + css = { + 'all': ('css/admin/checks.css',) + } + + search_fields = ["question", "answer"] + list_display = ("id", "question", "answer") + + list_filter = ["question", "answer"] + list_display_links = ("id", "question") diff --git a/hc/api/migrations/0051_auto_20180719_1857.py b/hc/api/migrations/0051_auto_20180719_1857.py new file mode 100644 index 00000000..cfee42fe --- /dev/null +++ b/hc/api/migrations/0051_auto_20180719_1857.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-19 18:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0050_merge_20180716_0922'), + ] + + operations = [ + migrations.CreateModel( + name='Faq', + fields=[ + ('id', models.AutoField(auto_created=True, + primary_key=True, serialize=False, + verbose_name='ID')), + ('question', models.TextField(blank=True)), + ('answer', models.TextField(blank=True)), + ], + ), + migrations.CreateModel( + name='Video', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, + serialize=False, verbose_name='ID')), + ('header', models.TextField(blank=True)), + ('description', models.TextField(blank=True)), + ('video_link', models.URLField( + help_text='https://www.youtube.com/watch?v=5sMKX22BHeEM')), + ], + ), + migrations.AlterField( + model_name='check', + name='twilio_number', + field=models.TextField( + blank=True, default='+00000000000', null=True), + ), + ] diff --git a/hc/api/migrations/0052_auto_20180723_1254.py b/hc/api/migrations/0052_auto_20180723_1254.py new file mode 100644 index 00000000..a300724a --- /dev/null +++ b/hc/api/migrations/0052_auto_20180723_1254.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-23 12:54 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0051_auto_20180719_1857'), + ] + + operations = [ + migrations.AlterField( + model_name='video', + name='video_link', + field=models.URLField(), + ), + ] diff --git a/hc/api/migrations/0053_merge_20180723_1342.py b/hc/api/migrations/0053_merge_20180723_1342.py new file mode 100644 index 00000000..029c6677 --- /dev/null +++ b/hc/api/migrations/0053_merge_20180723_1342.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2018-07-23 13:42 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0052_merge_20180718_0911'), + ('api', '0052_auto_20180723_1254'), + ] + + operations = [ + ] diff --git a/hc/api/models.py b/hc/api/models.py index 3312ed7a..4f42bb1c 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -306,3 +306,14 @@ class Meta: channel = models.ForeignKey(Channel) created = models.DateTimeField(auto_now_add=True) error = models.CharField(max_length=200, blank=True) + + +class Faq(models.Model): + question = models.TextField(blank=True, null=False) + answer = models.TextField(blank=True, null=False) + + +class Video(models.Model): + header = models.TextField(blank=True, null=False) + description = models.TextField(blank=True, null=False) + video_link = models.URLField(blank=False, null=False) diff --git a/hc/api/tests/test_sendalerts_until_resolved.py b/hc/api/tests/test_sendalerts_until_resolved.py index ca2da44b..82b6d196 100644 --- a/hc/api/tests/test_sendalerts_until_resolved.py +++ b/hc/api/tests/test_sendalerts_until_resolved.py @@ -23,3 +23,5 @@ def test_it_handles_unresolved(self, mock): result = Command().handle_many() self.assertEqual(result, True) + + # def test_set_priority_level(self) diff --git a/hc/front/tests/test_help_center.py b/hc/front/tests/test_help_center.py new file mode 100644 index 00000000..8102f29b --- /dev/null +++ b/hc/front/tests/test_help_center.py @@ -0,0 +1,17 @@ +from hc.test import BaseTestCase +from django.urls import reverse + + +class HelpCenterTestCase(BaseTestCase): + def setUp(self): + super(HelpCenterTestCase, self).setUp() + + def test_faq_works(self): + self.client.login(username="alice@example.org", password="password") + response = self.client.get(reverse("hc-faqs")) + self.assertEqual(response.status_code, 200) + + def test_help_videos_work(self): + self.client.login(username="alice@example.org", password="password") + response = self.client.get(reverse("hc-help-videos")) + self.assertEqual(response.status_code, 200) diff --git a/hc/front/urls.py b/hc/front/urls.py index 81657df0..0a9c6e7b 100644 --- a/hc/front/urls.py +++ b/hc/front/urls.py @@ -52,4 +52,6 @@ url(r'^about/$', views.about, name="hc-about"), url(r'^privacy/$', views.privacy, name="hc-privacy"), url(r'^terms/$', views.terms, name="hc-terms"), + url(r'^faqs/$', views.faq, name="hc-faqs"), + url(r'^help_videos/$', views.help_videos, name="hc-help-videos"), ] diff --git a/hc/front/views.py b/hc/front/views.py index ea8abf22..794fadad 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -14,7 +14,8 @@ from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlencode from hc.api.decorators import uuid_or_400 -from hc.api.models import DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, Ping +from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, + Ping, Video, Faq) from hc.front.forms import (AddChannelForm, AddWebhookForm, NameTagsDepartmentForm, @@ -733,3 +734,28 @@ def unresolved_checks(request): } return render(request, "front/unresolved_checks.html", ctx) + + +@login_required +def help_videos(request): + q = Video.objects.order_by("id") + videos = list(q) + + ctx = { + "page": "help_videos", + "help_videos": videos + } + + return render(request, "front/help_videos.html", ctx) + + +@login_required +def faq(request): + q = Faq.objects.order_by("id") + faqs = list(q) + + ctx = { + "page": "faqs", + "faqs": faqs + } + return render(request, "front/faqs.html", ctx) diff --git a/hc/settings.py b/hc/settings.py index eb6586bb..c4bdacb3 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -41,7 +41,7 @@ 'hc.accounts', 'hc.api', 'hc.front', - 'hc.payments' + 'hc.payments', ) diff --git a/hc/urls.py b/hc/urls.py index 12c23c67..8ad7edbf 100644 --- a/hc/urls.py +++ b/hc/urls.py @@ -6,5 +6,5 @@ url(r'^accounts/', include('hc.accounts.urls')), url(r'^', include('hc.api.urls')), url(r'^', include('hc.front.urls')), - url(r'^', include('hc.payments.urls')) + url(r'^', include('hc.payments.urls')), ] diff --git a/templates/base.html b/templates/base.html index 51ea0a76..0fb8f319 100644 --- a/templates/base.html +++ b/templates/base.html @@ -110,6 +110,24 @@
  • About
  • + {% if request.user.is_authenticated %} + + {% endif %} diff --git a/templates/front/faqs.html b/templates/front/faqs.html new file mode 100644 index 00000000..8d32ebf8 --- /dev/null +++ b/templates/front/faqs.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% load staticfiles %} +{% block title %}FAQs - healthchecks.io{% endblock %} +{% block content %} +
    +
    +

    Frequently Asked Questions

    +
    + {% if faqs %} + {% for faq in faqs %} +
    + +
    +
    {{ faq.answer }}
    +
    +
    + {% endfor %} + {% else %} +
    No FAQs available.
    + {% endif %} +
    +
    +
    +{% endblock %} \ No newline at end of file diff --git a/templates/front/help_videos.html b/templates/front/help_videos.html new file mode 100644 index 00000000..7ad96892 --- /dev/null +++ b/templates/front/help_videos.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block title %}Help Center - healthchecks.io{% endblock %} + +{% block content %} +
    +
    + +

    Welcome to the help videos

    +

    + Healthchecks.io is an open source project on + GitHub +

    +
    +
    + {% if help_videos %} + {% for help_video in help_videos %} +

    {{ help_video.header }}

    +

    {{ help_video.description }}

    + + {% endfor %} + {% else %} +
    There are currently no videos available.
    + {% endif %} +
    +
    + +
    +
    +{% endblock %} \ No newline at end of file diff --git a/templates/front/welcome.html b/templates/front/welcome.html index 2e9bd908..65605d78 100644 --- a/templates/front/welcome.html +++ b/templates/front/welcome.html @@ -334,6 +334,17 @@

    A quick peek of what's inside:

    + + + {% endcompress %} {% endblock %} From f07eea5f7d144f0e8612867edc0f7c3f9dd04932 Mon Sep 17 00:00:00 2001 From: magicmarie Date: Mon, 23 Jul 2018 17:34:41 +0300 Subject: [PATCH 3/4] Fix merge conflicts --- hc/front/views.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hc/front/views.py b/hc/front/views.py index 1def2049..0c1c1f2d 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -14,20 +14,12 @@ from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlencode from hc.api.decorators import uuid_or_400 -from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, - Ping, Video, Faq) -from hc.front.forms import (AddChannelForm, - AddWebhookForm, - NameTagsDepartmentForm, - TimeoutForm, - NagIntervalForm, - ShopifyForm, - PriorityForm) import shopify from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, Ping, Video, Faq) -from hc.front.forms import (AddChannelForm, AddWebhookForm, NameTagsForm, - TimeoutForm, NagIntervalForm, PriorityForm) +from hc.front.forms import (AddChannelForm, AddWebhookForm, + TimeoutForm, NagIntervalForm, PriorityForm, + ShopifyForm, NameTagsDepartmentForm) # from itertools recipes: From 063b2ce7a81c702b7f22bdfda71725febf650f85 Mon Sep 17 00:00:00 2001 From: magicmarie Date: Mon, 23 Jul 2018 17:34:41 +0300 Subject: [PATCH 4/4] Fix merge conflicts --- Procfile | 2 +- hc/front/views.py | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Procfile b/Procfile index 415e20cb..9609b8d8 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -release: bash ./pre-release.sh +release: ./manage.py migrate web: gunicorn hc.wsgi:application \ No newline at end of file diff --git a/hc/front/views.py b/hc/front/views.py index 1def2049..0c1c1f2d 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -14,20 +14,12 @@ from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlencode from hc.api.decorators import uuid_or_400 -from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, - Ping, Video, Faq) -from hc.front.forms import (AddChannelForm, - AddWebhookForm, - NameTagsDepartmentForm, - TimeoutForm, - NagIntervalForm, - ShopifyForm, - PriorityForm) import shopify from hc.api.models import (DEFAULT_GRACE, DEFAULT_TIMEOUT, Channel, Check, Ping, Video, Faq) -from hc.front.forms import (AddChannelForm, AddWebhookForm, NameTagsForm, - TimeoutForm, NagIntervalForm, PriorityForm) +from hc.front.forms import (AddChannelForm, AddWebhookForm, + TimeoutForm, NagIntervalForm, PriorityForm, + ShopifyForm, NameTagsDepartmentForm) # from itertools recipes: