From eec08267506b75b0f6deda156ddad8c58036bbc0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 16 May 2018 11:57:06 +0200 Subject: [PATCH 1/2] added link to the TOS page if it is activated --- src/Content/Nav.php | 4 ++++ view/templates/nav.tpl | 2 ++ view/theme/duepuntozero/templates/nav.tpl | 2 ++ view/theme/frio/templates/nav.tpl | 3 +++ view/theme/quattro/templates/nav.tpl | 1 + view/theme/smoothly/templates/nav.tpl | 1 + view/theme/vier/templates/nav.tpl | 1 + 7 files changed, 14 insertions(+) diff --git a/src/Content/Nav.php b/src/Content/Nav.php index cd2cfb3639..b0fe8a14e6 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -174,6 +174,10 @@ class Nav $nav['about'] = ['friendica', L10n::t('Information'), '', L10n::t('Information about this friendica instance')]; + if (Config::get('system', 'tosdisplay')) { + $nav['tos'] = ['tos', L10n::t('Terms of Service'), '', L10n::t('Terms of Service of this Friendica instance')]; + } + // The following nav links are only show to logged in users if (local_user()) { $nav['network'] = ['network', L10n::t('Network'), '', L10n::t('Conversations from your friends')]; diff --git a/view/templates/nav.tpl b/view/templates/nav.tpl index b6513e0fe8..3c71fa938a 100644 --- a/view/templates/nav.tpl +++ b/view/templates/nav.tpl @@ -12,6 +12,8 @@ {{if $nav.register}}{{$nav.register.1}}{{/if}} {{if $nav.help}} {{$nav.help.1}}{{/if}} + + {{if $nav.tos}} {{$nav.tos.1}}{{/if}} {{if $nav.apps}}{{$nav.apps.1}}{{/if}} diff --git a/view/theme/duepuntozero/templates/nav.tpl b/view/theme/duepuntozero/templates/nav.tpl index a47dca3902..fcab9dbdea 100644 --- a/view/theme/duepuntozero/templates/nav.tpl +++ b/view/theme/duepuntozero/templates/nav.tpl @@ -12,6 +12,8 @@ {{if $nav.register}}{{$nav.register.1}}{{/if}} {{if $nav.help}} {{$nav.help.1}}{{/if}} + + {{if $nav.tos}} {{$nav.tos.1}}{{/if}} {{if $nav.apps}}{{$nav.apps.1}}{{/if}} diff --git a/view/theme/frio/templates/nav.tpl b/view/theme/frio/templates/nav.tpl index 96f42e7ac6..c41243bc5c 100644 --- a/view/theme/frio/templates/nav.tpl +++ b/view/theme/frio/templates/nav.tpl @@ -161,6 +161,9 @@ {{if $nav.help}}
  • {{$nav.help.1}}
  • {{/if}} + {{if $nav.tos}} +
  • {{$nav.tos.1}}
  • + {{/if}} {{if $nav.settings}}
  • {{$nav.settings.1}}
  • {{/if}} diff --git a/view/theme/quattro/templates/nav.tpl b/view/theme/quattro/templates/nav.tpl index f0aacd4261..b5ae5c2d07 100644 --- a/view/theme/quattro/templates/nav.tpl +++ b/view/theme/quattro/templates/nav.tpl @@ -78,6 +78,7 @@ {{if $nav.logout}}
  • {{$nav.logout.1}}
  • {{/if}} {{if $nav.login}}
  • {{$nav.login.1}}
  • {{/if}} + {{if $nav.tos}}
  • {{$nav.tos.1}}
  • {{/if}} diff --git a/view/theme/smoothly/templates/nav.tpl b/view/theme/smoothly/templates/nav.tpl index faa6027b12..0c55b58869 100644 --- a/view/theme/smoothly/templates/nav.tpl +++ b/view/theme/smoothly/templates/nav.tpl @@ -50,6 +50,7 @@ {{if $nav.admin}}
  • {{$nav.admin.1}}
  • {{/if}} {{if $nav.help}}
  • {{$nav.help.1}}
  • {{/if}} + {{if $nav.tos}}
  • {{$nav.tos.1}}
  • {{/if}} {{if $nav.login}}
  • {{$nav.login.1}}
  • {{/if}} {{if $nav.logout}}
  • {{$nav.logout.1}}
  • {{/if}} diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index 281714e3ed..376fcdc312 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -43,6 +43,7 @@ From f285d9c7eb371ca2a0bd97ca6eb6a7562684c8f1 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 16 May 2018 13:41:56 +0200 Subject: [PATCH 2/2] add link to TOS in frios registration template if enabled --- view/theme/frio/templates/register.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/theme/frio/templates/register.tpl b/view/theme/frio/templates/register.tpl index c91870e706..30ead3c4bb 100644 --- a/view/theme/frio/templates/register.tpl +++ b/view/theme/frio/templates/register.tpl @@ -60,6 +60,10 @@ {{$publish}} + {{if $showtoslink}} +

    {{$tostext}}

    + {{/if}} +