From fd7ea5cc915daa7416d1abc9935d0fbe0b83a182 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Sun, 5 Aug 2012 16:55:20 -0400 Subject: [PATCH 1/2] quattro: support threaded comments --- view/theme/quattro/dark/style.css | 31 +++++ view/theme/quattro/green/style.css | 31 +++++ view/theme/quattro/quattro.less | 30 +++++ view/theme/quattro/threaded_conversation.tpl | 45 +++++++ view/theme/quattro/wall_item_tag.tpl | 4 +- view/theme/quattro/wall_thread.tpl | 112 +++++++++++++++++ view/theme/quattro/wallwall_thread.tpl | 119 +++++++++++++++++++ 7 files changed, 371 insertions(+), 1 deletion(-) create mode 100644 view/theme/quattro/threaded_conversation.tpl create mode 100644 view/theme/quattro/wall_thread.tpl create mode 100644 view/theme/quattro/wallwall_thread.tpl diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 087d9c746f..6bd9ab06fb 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1068,6 +1068,9 @@ section { color: #2d2d2d; border: 1px solid #2d2d2d; } +.threaded .wall-item-comment-wrapper { + margin-left: 0px; +} .comment-edit-preview { width: 710px; border: 1px solid #2d2d2d; @@ -1139,6 +1142,34 @@ section { width: 25px; height: 25px; } +/* threaded comments */ +.children > .children { + margin-left: 40px; +} +.children > .children .wall-item-container { + width: 710px; +} +.children > .children > .children { + margin-left: 40px; +} +.children > .children > .children .wall-item-container { + width: 670px; +} +.children > .children > .children > .children { + margin-left: 40px; +} +.children > .children > .children > .children .wall-item-container { + width: 630px; +} +.children > .children > .children > .children > .children { + margin-left: 40px; +} +.children > .children > .children > .children > .children .wall-item-container { + width: 590px; +} +.children > .children > .children > .children > .children .children { + margin-left: 0px; +} span[id^="showmore-teaser"] { background: url("showmore-bg.jpg") no-repeat center bottom; } diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 9c28473c61..2e97027b4b 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1068,6 +1068,9 @@ section { color: #2d2d2d; border: 1px solid #2d2d2d; } +.threaded .wall-item-comment-wrapper { + margin-left: 0px; +} .comment-edit-preview { width: 710px; border: 1px solid #2d2d2d; @@ -1139,6 +1142,34 @@ section { width: 25px; height: 25px; } +/* threaded comments */ +.children > .children { + margin-left: 40px; +} +.children > .children .wall-item-container { + width: 710px; +} +.children > .children > .children { + margin-left: 40px; +} +.children > .children > .children .wall-item-container { + width: 670px; +} +.children > .children > .children > .children { + margin-left: 40px; +} +.children > .children > .children > .children .wall-item-container { + width: 630px; +} +.children > .children > .children > .children > .children { + margin-left: 40px; +} +.children > .children > .children > .children > .children .wall-item-container { + width: 590px; +} +.children > .children > .children > .children > .children .children { + margin-left: 0px; +} span[id^="showmore-teaser"] { background: url("showmore-bg.jpg") no-repeat center bottom; } diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index b5f0af6696..55b2d73ac5 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -538,6 +538,8 @@ section { } } +.threaded .wall-item-comment-wrapper { margin-left: 0px; } + .comment-edit-preview { width: 710px; border: 1px solid @Grey5; @@ -594,6 +596,34 @@ section { } .wwto .contact-photo { width: 25px; height: 25px; } +/* threaded comments */ +.children { + + &> .children { + margin-left: 40px; + .wall-item-container { width: 710px; } + + &> .children { + margin-left: 40px; + .wall-item-container { width: 670px; } + + &> .children { + margin-left: 40px; + .wall-item-container { width: 630px; } + + &> .children { + margin-left: 40px; + .wall-item-container { width: 590px; } + + .children { + margin-left: 0px; + } + } + } + } + } +} + span[id^="showmore-teaser"]{ background: url("showmore-bg.jpg") no-repeat center bottom; } diff --git a/view/theme/quattro/threaded_conversation.tpl b/view/theme/quattro/threaded_conversation.tpl new file mode 100644 index 0000000000..305ace92ef --- /dev/null +++ b/view/theme/quattro/threaded_conversation.tpl @@ -0,0 +1,45 @@ +{{ for $threads as $item }} +
+ {{if $mode == display}} + {{ else }} + {{if $item.comment_firstcollapsed}} +
+ $item.num_comments $item.hide_text +
+ {{endif}} + {{ endif }} + + {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl }}{{ endinc }} + {{ else }} + {{ inc $item.template }}{{ endinc }} + {{ endif }} + +
+{{ endfor }} + +
+ +{{ if $dropping }} + + $dropping + +{{ endif }} + + + +{{ if $mode == display }} + +{{ endif }} + diff --git a/view/theme/quattro/wall_item_tag.tpl b/view/theme/quattro/wall_item_tag.tpl index 926fc929d2..205fcfebc0 100644 --- a/view/theme/quattro/wall_item_tag.tpl +++ b/view/theme/quattro/wall_item_tag.tpl @@ -13,11 +13,13 @@
$item.location
- $item.body + $item.ago $item.body
+{{ if $item.flatten }}
$item.comment
+{{ endif }} diff --git a/view/theme/quattro/wall_thread.tpl b/view/theme/quattro/wall_thread.tpl new file mode 100644 index 0000000000..b51dc3d7df --- /dev/null +++ b/view/theme/quattro/wall_thread.tpl @@ -0,0 +1,112 @@ + +
+ $item.star.starred + {{ if $item.lock }}$item.lock{{ endif }} + +
+ +
+
+
+
+ + $item.name + + menu + + +
+
$item.location
+
+
+ {{ if $item.title }}

$item.title

{{ endif }} + $item.body +
+
+
+ +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $item.plink }}$item.plink.title{{ endif }} +
+
+
+ $item.name $item.ago +
+ +
+ {{ if $item.star }} + $item.star.do + $item.star.undo + $item.star.tagger + {{ endif }} + {{ if $item.filer }} + $item.filer + {{ endif }} + + {{ if $item.vote }} + $item.vote.like.1 + $item.vote.dislike.1 + {{ endif }} + + {{ if $item.vote.share }} + $item.vote.share.1 + {{ endif }} +
+ +
+ + {{ if $item.drop.dropping }} + + $item.drop.delete + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$item.dislike
+
+ {{ if $item.threaded }}{{ if $item.comment }} +
+ +
+ $item.comment +
+
+ {{ endif }}{{ endif }} + +
+ + +{{ for $item.children as $item }} +
+ {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl }}{{ endinc }} + {{ else }} + {{ inc $item.template }}{{ endinc }} + {{ endif }} +
+{{ endfor }} + +{{ if $item.flatten }} +
+ $item.comment +
+{{ endif }} diff --git a/view/theme/quattro/wallwall_thread.tpl b/view/theme/quattro/wallwall_thread.tpl new file mode 100644 index 0000000000..038b156d12 --- /dev/null +++ b/view/theme/quattro/wallwall_thread.tpl @@ -0,0 +1,119 @@ +
+ $item.star.starred + {{ if $item.lock }}$item.lock{{ endif }} + +
+ +
+
+
+
+ + $item.name + + menu + + +
+
+ + $item.owner_name + +
+
$item.location
+
+
+ {{ if $item.title }}

$item.title

{{ endif }} + $item.body +
+
+
+ +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+ +
+
+ $item.name $item.ago +
$item.to $item.owner_name $item.vwall + +
+ +
+ {{ if $item.star }} + $item.star.do + $item.star.undo + $item.star.tagger + + {{ endif }} + {{ if $item.filer }} + $item.filer + {{ endif }} + + {{ if $item.vote }} + $item.vote.like.1 + $item.vote.dislike.1 + {{ endif }} + + {{ if $item.vote.share }} + $item.vote.share.1 + {{ endif }} +
+ +
+ + {{ if $item.drop.dropping }} + + $item.drop.delete + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$item.dislike
+
+ + {{ if $item.threaded }}{{ if $item.comment }} +
+ +
+ $item.comment +
+
+ {{ endif }}{{ endif }} +
+ + +{{ for $item.children as $item }} +
+ {{ if $item.type == tag }} + {{ inc wall_item_tag.tpl }}{{ endinc }} + {{ else }} + {{ inc $item.template }}{{ endinc }} + {{ endif }} +
+{{ endfor }} + +{{ if $item.flatten }} +
+ $item.comment +
+{{ endif }} From 4062312e9c41a337d54beaccd57f8637eb8decad Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Mon, 6 Aug 2012 04:47:35 -0400 Subject: [PATCH 2/2] quattro: collaps threaded items --- view/theme/quattro/dark/style.css | 21 +++++++++++--------- view/theme/quattro/green/style.css | 21 +++++++++++--------- view/theme/quattro/quattro.less | 9 +++++---- view/theme/quattro/threaded_conversation.tpl | 12 +---------- view/theme/quattro/wall_thread.tpl | 15 ++++++++++++++ view/theme/quattro/wallwall_thread.tpl | 15 ++++++++++++++ 6 files changed, 60 insertions(+), 33 deletions(-) diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 6bd9ab06fb..5ff0591602 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1143,33 +1143,36 @@ section { height: 25px; } /* threaded comments */ -.children > .children { +.children .children { margin-left: 40px; } -.children > .children .wall-item-container { +.children .children .wall-item-container { width: 710px; } -.children > .children > .children { +.children .children .children { margin-left: 40px; } -.children > .children > .children .wall-item-container { +.children .children .children .wall-item-container { width: 670px; } -.children > .children > .children > .children { +.children .children .children .children { margin-left: 40px; } -.children > .children > .children > .children .wall-item-container { +.children .children .children .children .wall-item-container { width: 630px; } -.children > .children > .children > .children > .children { +.children .children .children .children .children { margin-left: 40px; } -.children > .children > .children > .children > .children .wall-item-container { +.children .children .children .children .children .wall-item-container { width: 590px; } -.children > .children > .children > .children > .children .children { +.children .children .children .children .children .children { margin-left: 0px; } +.threaded .hide-comments-outer { + margin-left: 20px; +} span[id^="showmore-teaser"] { background: url("showmore-bg.jpg") no-repeat center bottom; } diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 2e97027b4b..3cc4e8cf61 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1143,33 +1143,36 @@ section { height: 25px; } /* threaded comments */ -.children > .children { +.children .children { margin-left: 40px; } -.children > .children .wall-item-container { +.children .children .wall-item-container { width: 710px; } -.children > .children > .children { +.children .children .children { margin-left: 40px; } -.children > .children > .children .wall-item-container { +.children .children .children .wall-item-container { width: 670px; } -.children > .children > .children > .children { +.children .children .children .children { margin-left: 40px; } -.children > .children > .children > .children .wall-item-container { +.children .children .children .children .wall-item-container { width: 630px; } -.children > .children > .children > .children > .children { +.children .children .children .children .children { margin-left: 40px; } -.children > .children > .children > .children > .children .wall-item-container { +.children .children .children .children .children .wall-item-container { width: 590px; } -.children > .children > .children > .children > .children .children { +.children .children .children .children .children .children { margin-left: 0px; } +.threaded .hide-comments-outer { + margin-left: 20px; +} span[id^="showmore-teaser"] { background: url("showmore-bg.jpg") no-repeat center bottom; } diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 55b2d73ac5..a424ee0207 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -599,19 +599,19 @@ section { /* threaded comments */ .children { - &> .children { + & .children { margin-left: 40px; .wall-item-container { width: 710px; } - &> .children { + & .children { margin-left: 40px; .wall-item-container { width: 670px; } - &> .children { + & .children { margin-left: 40px; .wall-item-container { width: 630px; } - &> .children { + & .children { margin-left: 40px; .wall-item-container { width: 590px; } @@ -623,6 +623,7 @@ section { } } } +.threaded .hide-comments-outer { margin-left: 20px; } span[id^="showmore-teaser"]{ background: url("showmore-bg.jpg") no-repeat center bottom; diff --git a/view/theme/quattro/threaded_conversation.tpl b/view/theme/quattro/threaded_conversation.tpl index 305ace92ef..491c47302f 100644 --- a/view/theme/quattro/threaded_conversation.tpl +++ b/view/theme/quattro/threaded_conversation.tpl @@ -1,16 +1,6 @@ {{ for $threads as $item }}
- {{if $mode == display}} - {{ else }} - {{if $item.comment_firstcollapsed}} -
- $item.num_comments $item.hide_text -
- {{endif}} - {{ endif }} - + {{ if $item.type == tag }} {{ inc wall_item_tag.tpl }}{{ endinc }} {{ else }} diff --git a/view/theme/quattro/wall_thread.tpl b/view/theme/quattro/wall_thread.tpl index b51dc3d7df..4d454f00db 100644 --- a/view/theme/quattro/wall_thread.tpl +++ b/view/theme/quattro/wall_thread.tpl @@ -1,3 +1,13 @@ +{{if $mode == display}} +{{ else }} +{{if $item.comment_firstcollapsed}} +
+ $item.num_comments $item.hide_text +
+ {{endif}} +{{ endif }} + {{ if $item.flatten }}
$item.comment diff --git a/view/theme/quattro/wallwall_thread.tpl b/view/theme/quattro/wallwall_thread.tpl index 038b156d12..cc2f8e3627 100644 --- a/view/theme/quattro/wallwall_thread.tpl +++ b/view/theme/quattro/wallwall_thread.tpl @@ -1,3 +1,13 @@ +{{if $mode == display}} +{{ else }} +{{if $item.comment_firstcollapsed}} +
+ $item.num_comments $item.hide_text +
+ {{endif}} +{{ endif }} + {{ if $item.flatten }}
$item.comment