summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2007-11-12 04:00:13 +0000
committerwjames5 <will@tekimaki.com>2007-11-12 04:00:13 +0000
commite09f929fd8e8d97c7d89472babccc5cc8083423d (patch)
tree4706acdfffc461d79ec4010a249f4055995cc9ad /templates
parent42b7ad0c09652625df2e283e54f1a71f81f4a70c (diff)
downloadblogs-e09f929fd8e8d97c7d89472babccc5cc8083423d.tar.gz
blogs-e09f929fd8e8d97c7d89472babccc5cc8083423d.tar.bz2
blogs-e09f929fd8e8d97c7d89472babccc5cc8083423d.zip
overhaul of crossposting options - now you can add a note to each crosspost and edit those notes. still todo would be to support editing the crossposting date, and to be able to assign a format type to the note so you can style the note text inline. crosspost notes are displayed at the top of a blogpost when viewed within the blog crossposted to
Diffstat (limited to 'templates')
-rw-r--r--templates/blog_list_post.tpl4
-rw-r--r--templates/crosspost.tpl53
2 files changed, 46 insertions, 11 deletions
diff --git a/templates/blog_list_post.tpl b/templates/blog_list_post.tpl
index 889ae09..84c504b 100644
--- a/templates/blog_list_post.tpl
+++ b/templates/blog_list_post.tpl
@@ -50,6 +50,10 @@
<div class="content">
{if $aPost.avatar}<img src="{$aPost.avatar}" class="avatar" />{/if}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$aPost}
+
+ {if $aPost.crosspost_note}
+ <div class="crosspost_note">{$aPost.crosspost_note}</div>
+ {/if}
{* deal with the blog post image if there is one *}
{if $gBitSystem->isFeatureActive( 'blog_show_image' ) && $aPost.thumbnail_url}
diff --git a/templates/crosspost.tpl b/templates/crosspost.tpl
index a3fbea7..3cb1b07 100644
--- a/templates/crosspost.tpl
+++ b/templates/crosspost.tpl
@@ -5,33 +5,64 @@
</div>
<div class="body">
-
{form enctype="multipart/form-data" name="blogpost" id="editpageform"}
<input type="hidden" name="post_id" value="{$post_id|escape}" />
<input type="hidden" name="rows" value="{$rows}"/>
- <input type="hidden" name="cols" value="{$cols}"/>
-
+ <input type="hidden" name="cols" value="{$cols}"/>
{legend legend="Crosspost"}
+ {* we loop over this twice because we want two separate lists from the same hash *}
+ {if $availableBlogs}
+ <div class="row">
+ {formlabel label="Blogs this Post is Already Crossposted To" for="blog_id"}
+ {forminput}
+ {foreach from=$availableBlogs key=blogContentId item=availBlogTitle}
+ {if $gContent->mInfo.blogs.$blogContentId && ($blogContentId != $crosspost.blog_content_id) }
+ {assign var="has_crosspost" value=TRUE}
+ {$availBlogTitle|escape}
+ &nbsp;<a title="{tr}Edit{/tr}" href="{$smarty.const.BLOGS_PKG_URL}crosspost.php?blog_content_id={$blogContentId}&amp;post_id={$post_info.post_id}">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="edit crosspost note"}</a>
+ &nbsp;<a title="{tr}Remove{/tr}" href="{$smarty.const.BLOGS_PKG_URL}crosspost.php?action=remove&amp;post_id={$post_info.post_id}&amp;blog_content_id={$blogContentId}&amp;status_id=300">{biticon ipackage="icons" iname="edit-delete" iexplain="delete this crossposting"}</a><br/>
+ {/if}
+ {/foreach}
+ {if !$has_crosspost}
+ {formhelp note="This blog post has not been crossposted to any blogs yet."}
+ {else}
+ {formhelp note=""}
+ {/if}
+ {/forminput}
+ </div><br/>
+ {/if}
+
{if $availableBlogs}
<div class="row">
{formlabel label="Include in Blogs" for="blog_id"}
{forminput}
{foreach from=$availableBlogs key=blogContentId item=availBlogTitle}
- <input name="blog_content_id[]" type="checkbox" option value="{$blogContentId}" {if $gContent->mInfo.blogs.$blogContentId}checked="checked"{/if}>{$availBlogTitle|escape}</option><br/>
+ {if !$gContent->mInfo.blogs.$blogContentId || ($blogContentId == $crosspost.blog_content_id) }
+ {assign var="has_crosspost_option" value=TRUE}
+ <input name="blog_content_id[]" type="checkbox" option value="{$blogContentId}" {if $blogContentId == $crosspost.blog_content_id}checked="checked"{/if}>{$availBlogTitle|escape}</option><br/>
+ {/if}
{/foreach}
- {formhelp note="You can cross post to any and all of the blogs listed above.<br />Just check off the blogs you wish this post to also show up in."}
+ {if !$has_crosspost_option}
+ {formhelp note="This blog post has been crossposted to all blogs you have permission to cross post to."}
+ {else}
+ {formhelp note="You can cross post to any and all of the blogs listed above.<br />Just check off the blogs you wish this post to also show up in."}
+ {/if}
{/forminput}
</div>
{/if}
-
- <div class="row submit">
- <input type="submit" name="preview" value="{tr}Preview{/tr}" />&nbsp;
- <input type="submit" name="save_post_exit" value="{tr}Save{/tr}" />
- </div>
+ {if $has_crosspost_option}
+ {textarea id="crosspost_note" label="Crosspost Note (Optional)" name="crosspost_note" noformat="y" rows=6 help="Add a note you would like to appear above the post when viewed on the crossposted blog. This does not appear on the post page."}{$crosspost.crosspost_note}{/textarea}
+
+ <div class="row submit">
+ <input type="submit" name="preview" value="{tr}Preview{/tr}" />&nbsp;
+ <input type="submit" name="save_post_exit" value="{tr}Save{/tr}" />
+ </div>
+ {/if}
{/legend}
{/form}
-
+
+
{* ------this is the same as the guts of view_blog_post---- *}
<div class="display blogs">