summaryrefslogtreecommitdiff
path: root/templates/mime_view.tpl
blob: 7bcf038bce58e9175c8b0415494c680088765f64 (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
{strip}
<div class="display attachment">
	<div class="header">
		<h1>{tr}View Attachment{/tr}</h1>
	</div>

	<div class="body">
		{legend legend="File Details"}
			{include file=$view_template preferences=$attachment.preferences}
		{/legend}

		{if ( $gBitUser->isAdmin() || $gBitUser->mUserId == $attachment.user_id ) && $edit_template}
			{form legend="Edit File Details"}
				{formfeedback hash=$feedback}
				{include file=$edit_template preferences=$attachment.preferences}

				<div class="form-group submit">
					<input type="hidden" name="attachment_id" value="{$smarty.request.attachment_id}" />
					<input type="submit" class="btn btn-default" name="plugin_submit" value="{tr}Update File{/tr}" />
				</div>
			{/form}
		{/if}

		{legend legend="Content this attachment belongs to"}
			<div class="form-group">
				{formlabel label="Title"}
				{forminput}
					<a href="{$gContent->getDisplayUrl()}">{$gContent->getTitle()}</a>
				{/forminput}
			</div>

			<div class="form-group">
				{formlabel label="Content Type"}
				{forminput}
					{$gContent->getContentTypeName()}
				{/forminput}
			</div>
		{/legend}

		{if $usage}
			{legend legend="Content this attachment is used in"}
				<ul>
					{foreach from=$usage item=use}
						<li><a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$use.content_id}">{$use.title}</a></li>
					{/foreach}
				</ul>
			{/legend}
		{/if}

	</div><!-- end .body -->
</div><!-- end .attachment -->
{/strip}