diff --git a/repository/Brea/BreaMember.class.st b/repository/Brea/BreaMember.class.st index 0fe58e8..3b3dfc2 100644 --- a/repository/Brea/BreaMember.class.st +++ b/repository/Brea/BreaMember.class.st @@ -28,6 +28,16 @@ BreaMember >> country: anObject [ country := anObject ] +{ #category : #public } +BreaMember >> countryTemplate [ + ^ '{{#country}} + + Country + {{.}} + + {{/country}}' asMustacheTemplate value: self +] + { #category : #helpers } BreaMember >> createTestUser [ ^ self class new @@ -37,8 +47,8 @@ BreaMember >> createTestUser [ memberOf: 'HackBo' withWebsite: 'http://hackbo.co/'; memberOf: 'mutabiT' withWebsite: 'http://mutabit.com/'; website: 'http://test.user'; - email: 'iam@test.user'; twitter: '@offrayLC'; + email: 'iam@test.user'; tags: 'just, a lot, of words, separated, by commas'. ] @@ -62,6 +72,19 @@ BreaMember >> facebook: aProfileName [ self webPresence facebook: aProfileName ] +{ #category : #public } +BreaMember >> facebookTemplate [ + ^ '{{#facebook}} + + + Facebook + + + {{.}} + + {{/facebook}}' asMustacheTemplate value: self +] + { #category : #accessing } BreaMember >> familyName [ ^ familyName @@ -131,7 +154,6 @@ BreaMember >> htmlOutput [ { #category : #public } BreaMember >> htmlOutputTemplate [ "I show the member profile as HTML" - ^ '

{{givenName}} {{familyName}}

@@ -147,34 +169,14 @@ BreaMember >> htmlOutputTemplate [ Name {{givenName}} {{familyName}} - - - Country - {{country}} - - - Organization(s) - HackBo, mutabiT - - - Website - - {{website}} - - - {{#twitter}} - - Twitter - - {{twitter}} - - {{/twitter}} - - - Tags
- {{ tags }} - - + ', + self countryTemplate, + self organizationsTemplate, + self websiteTemplate, + self twitterTemplate, + self facebookTemplate, + self tagsTemplate, + '
@@ -215,6 +217,19 @@ BreaMember >> organizations: anObject [ organizations := anObject ] +{ #category : #public } +BreaMember >> organizationsTemplate [ + ^ ' + + Organization(s) + + {{#organizations}} + {{name}} + {{/organizations}} + + ' asMustacheTemplate value: self +] + { #category : #accessing } BreaMember >> password [ ^ password @@ -250,6 +265,18 @@ BreaMember >> tags: anObject [ tags := anObject ] +{ #category : #public } +BreaMember >> tagsTemplate [ + ^ '{{#tags}} + + + Tags
+ {{.}} + + + {{/tags}}' asMustacheTemplate value: self +] + { #category : #accessing } BreaMember >> twitter [ ^ self webPresence twitter. @@ -262,11 +289,15 @@ BreaMember >> twitter: aProfileName [ { #category : #public } BreaMember >> twitterTemplate [ - ^ ' - Twitter - - {{twitter}} - ' asMustacheTemplate value: self + ^ '{{#twitter}} + + + Twitter + + + {{.}} + + {{/twitter}}' asMustacheTemplate value: self ] { #category : #accessing } @@ -288,3 +319,14 @@ BreaMember >> website [ BreaMember >> website: anUrl [ self webPresence website: anUrl ] + +{ #category : #public } +BreaMember >> websiteTemplate [ + ^ '{{#website}} + + Website + + {{.}} + + {{/website}}' asMustacheTemplate value: self +]