summaryrefslogtreecommitdiff
path: root/templates/edit_blog.tpl
blob: 98bd9bb549547048ebd93c8d1b18fc1049715594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{* $Header$ *}
{strip}

<div class="floaticon">{bithelp}</div>

<div class="edit blogs">
	<div class="header">
		<h1>{if $gContent->isValid()}{tr}Edit Blog{/tr}{else}{tr}Create Blog{/tr}{/if}</h1>
	</div>

	<div class="body">
		{if $smarty.request.preview}
			<div class="preview">
				<div class="header">
					<h1>{$title}</h1>
					{if $parsed}<h2>{$parsed}</h2>{/if}
					<div class="date">
						{tr}By{/tr}: {displayname user=$user_name}, {if $created}{$created|bit_short_datetime}{else}{$gContent->getField('created')|bit_short_datetime}{/if}<br />
					</div>
				</div>
			</div>
		{/if}

		{form ipackage="blogs" ifile="edit.php"}
			{jstabs}
				{jstab title="Blog Settings"}
					{legend legend="Blog Settings"}
						<input type="hidden" name="blog_id" value="{$gContent->getField('blog_id')}" />
						<input type="hidden" name="content_id" value="{$gContent->getField('content_id')}" />
						<div class="control-group">
							{formfeedback warning=$warning}
							{formlabel label="Title" for="title"}
							{forminput}
								<input type="text" name="title" id="title" value="{if $gContent->getTitle()}{$gContent->getTitle()|escape}{else}{displayname hash=$gBitUser->mInfo nolink=FALSE}'s Blog{/if}" />
							{/forminput}
						</div>

						{textarea}{if $edit}{$edit}{else}{$gContent->getField('data')}{/if}{/textarea}

						<div class="control-group">
							{formlabel label="Number of posts to show" for="max_posts"}
							{forminput}
								<input type="text" name="max_posts" id="max_posts" value="{$gContent->getField('max_posts')|escape|default:10}" />
								{formhelp note='Enter the number of blog posts you wish to display when viewing this blog.'}
							{/forminput}
						</div>

{* DEPRECATED - Slated for removal  -wjames5
						{if $gBitUser->hasPermission('p_blogs_create_is_public')}
						<div class="control-group">
							{formlabel label="Public" for="is_public"}
							{forminput}
								<input type="checkbox" name="is_public" id="is_public" {if $gContent->getField('is_public') eq 'y'}checked="checked"{/if} />
								{formhelp note='Allow other user to post in this blog'}
							{/forminput}
						</div>
						{/if}
*}

						<div class="control-group">
							{formlabel label="Use titles in blog posts" for="use_title"}
							{forminput}
								<input type="checkbox" name="use_title" id="use_title" {if !$gContent->isValid() || $gContent->getField('use_title') eq 'y'}checked="checked"{/if} />
								{formhelp note='If this is not selected, the time and date of when the post was created will be displayed instead of the post title.'}
							{/forminput}
						</div>

						<div class="control-group">
							{formlabel label="Allow search" for="use_find"}
							{forminput}
								<input type="checkbox" name="use_find" id="use_find" {if !$gContent->isValid() || $gContent->getField('use_find') eq 'y'}checked="checked"{/if} />
								{formhelp note='Allow users to search this blog for occurances of words.'}
							{/forminput}
						</div>

						<div class="control-group">
							{formlabel label="Allow comments" for="allow_comments"}
							{forminput}
								<input type="checkbox" name="allow_comments" id="allow_comments" {if !$gContent->isValid() || $gContent->getField('allow_comments') eq 'y'}checked="checked"{/if} />
								{formhelp note='Are other users allowed to add comments to posts made in this blog?'}
							{/forminput}
						</div>

						{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl"}

						<div class="control-group submit">
							<input type="submit" name="preview" value="{tr}preview{/tr}" />&nbsp;
							<input type="submit" name="save_blog" value="{tr}save{/tr}" />
						</div>
					{/legend}
				{/jstab}

				{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_tab_tpl"}
			{/jstabs}
		{/form}
	</div><!-- end .body -->
</div><!-- end .blog -->

{/strip}