Skip to content

Commit

Permalink
Merge pull request #257 from CodeForPhilly/develop
Browse files Browse the repository at this point in the history
Release: v3.1.3
  • Loading branch information
themightychris authored Oct 15, 2022
2 parents 50f95f2 + 200f8eb commit 96ae4c6
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .holo/sources/skeleton-v2.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[holosource]
url = "https://github.com/JarvusInnovations/emergence-skeleton-v2"
ref = "refs/tags/v2.10.0"
ref = "refs/tags/v2.11.1"
11 changes: 7 additions & 4 deletions html-templates/blog/blogPost.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="description" content="{$Post->Summary|default:$Post->Title|escape}" />

<meta property="og:site_name" content="{Laddr::$siteName|escape}" />
<meta property="og:url" content="http://{Site::getConfig(primary_hostname)}{$Post->getURL()}" />
<meta property="og:url" content="{absolute_url $Post->getURL()}" />
<meta property="og:type" content="article">
<meta property="og:title" content="{$Post->Title|escape}" />

Expand All @@ -16,7 +16,10 @@
{/if}

<meta property="article:published_time" content="{date($.const.DATE_W3C, $Post->Published)}" />
<meta property="article:author" content="http://{Site::getConfig(primary_hostname)}{$Post->Author->getURL()}" />

{if $Post->Author}
<meta property="article:author" content="{absolute_url $Post->Author->getURL()}" />
{/if}

<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{$Post->Title|escape}" />
Expand All @@ -30,7 +33,7 @@
{/if}

<?php

// find best media in post
$imageUrl = null;

Expand Down Expand Up @@ -93,7 +96,7 @@
{capture assign=authoredDate}<a href="{$Post->getURL()}">{timestamp $Post->Published}</a>{/capture}

<div class="article-meta">
{sprintf(_("on %s by %s"), $authorData, $authoredDate)}
{sprintf(_("by %1$s on %2$s"), $authorData, $authoredDate)}
</div>

{if $Post->Summary}
Expand Down
10 changes: 5 additions & 5 deletions html-templates/project-updates/projectUpdates.rss.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
{load_templates subtemplates/personName.tpl}


<channel rdf:about="http://{$.server.HTTP_HOST}{$.server.REQUEST_URI|escape}">
<channel rdf:about="{$.server.REQUEST_URI|absolute_url|escape}">
<title>{if $Project}{$Project->Title|escape} &#8212; {/if}{_ 'Project Updates'}</title>
<link>http://{Site::getConfig(primary_hostname)}/project-updates{if $Project}?ProjectID={$Project->ID}{/if}</link>
<link>{escape(absolute_url(tif($Project, "/project-updates?ProjectID=$Project->ID", "/project-updates")))}</link>
{capture assign=projectTitleText}{$Project->Title|escape}{/capture}
{capture assign=siteNameText}{Laddr::$siteName}{/capture}
{if $Project}
Expand All @@ -22,16 +22,16 @@
<items>
<rdf:Seq>
{foreach item=Update from=$data}
<rdf:li rdf:resource="http://{Site::getConfig(primary_hostname)}{$Update->getURL()}"/>
<rdf:li rdf:resource="{$Update->getURL()|absolute_url|escape}"/>
{/foreach}
</rdf:Seq>
</items>
</channel>

{foreach item=Update from=$data}
<item rdf:about="http://{Site::getConfig(primary_hostname)}{$Update->getURL()}">
<item rdf:about="{$Update->getURL()|absolute_url|escape}">
<title>{$Update->Project->Title|escape} &#8212; {_("Update #%u")|sprintf:$Update->Number}</title>
<link>http://{Site::getConfig(primary_hostname)}{$Update->getURL()}</link>
<link>{$Update->getURL()|absolute_url|escape}</link>
<description>{$Update->Body|escape|markdown|escape}</description>
<dc:creator>{personName $Update->Creator}</dc:creator>
<dc:date>{date($dwoo.const.DATE_W3C, $Update->Created)}</dc:date>
Expand Down
4 changes: 3 additions & 1 deletion html-templates/subtemplates/blog.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
{if $showHeader}
<header class="post-header">
<{$headingLevel} class="post-title">
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
{if $Post->Author}
<a class="pull-right" href="{$Post->Author->getURL()}" data-toggle="tooltip" title="{personName $Post->Author}">{avatar $Post->Author size=64}</a>
{/if}
<a href="{$Post->getURL()}">{$Post->Title|escape}</a>
</{$headingLevel}>
</header>
Expand Down
4 changes: 2 additions & 2 deletions html-templates/subtemplates/comments.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
{sprintf(_("You can use %s for formatting."), $markdownTextLink)}
</p>

<button type="submit" class="btn btn-primary">{tif $Comment ? {_ Edit} : {_ Post}} {_ Comment}</button>
<button type="submit" class="btn btn-primary">{tif $Comment ? _('Edit Comment') : _('Post Comment')}</button>
</div>
</fieldset>
</form>
{else}
{capture assign=loginTextLink}<a class="button primary" href="/login?return={$Context->getURL()|escape:url}">{_ "Log in"}</a>{/capture}
<p class="login-hint well">{sprintf(_("$s to post a comment."), $loginTextLink)}</p>
<p class="login-hint well">{sprintf(_("%s to post a comment."), $loginTextLink)}</p>
{/if}
{/template}

Expand Down
5 changes: 5 additions & 0 deletions php-classes/Laddr/PeopleRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,10 @@ protected static function onBeforeRecordDestroyed(\ActiveRecord $Person)
foreach ($Person->ProjectMemberships as $ProjectMembership) {
$ProjectMembership->destroy();
}

// delete comments
foreach ($Person->Comments as $Comment) {
$Comment->destroy();
}
}
}
7 changes: 0 additions & 7 deletions php-config/Emergence/People/User.config.d/laddr-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,3 @@
],
];
User::$dynamicFields[] = 'TechTags';

User::$relationships['Comments'] = [
'type' => 'context-children',
'class' => \Comment::class,
'contextClass' => __CLASS__,
'order' => ['ID' => 'DESC'],
];

0 comments on commit 96ae4c6

Please sign in to comment.