diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2008-05-28 18:55:00 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2008-05-28 18:55:00 +0000 |
| commit | 2c2144707aa3bdb85542eb164ab16c590d56e95e (patch) | |
| tree | beaa1484d8f9f53225a7bea0a5722a11d1dde0a8 /templates | |
| parent | 0b7dbf06594e7c45dc1cfc4d7142d15e2a4af50c (diff) | |
| download | liberty-2c2144707aa3bdb85542eb164ab16c590d56e95e.tar.gz liberty-2c2144707aa3bdb85542eb164ab16c590d56e95e.tar.bz2 liberty-2c2144707aa3bdb85542eb164ab16c590d56e95e.zip | |
add front and backend for plugins to insert edit template when viewing an attachment and allowing them to update their own data - view audio liberty plugin as sample.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mime_audio_edit_inc.tpl | 36 | ||||
| -rw-r--r-- | templates/mime_audio_view_inc.tpl | 9 | ||||
| -rw-r--r-- | templates/mime_view.tpl | 12 |
3 files changed, 57 insertions, 0 deletions
diff --git a/templates/mime_audio_edit_inc.tpl b/templates/mime_audio_edit_inc.tpl new file mode 100644 index 0000000..5ab22dc --- /dev/null +++ b/templates/mime_audio_edit_inc.tpl @@ -0,0 +1,36 @@ +{strip} +<div class="row"> + {formlabel label="Title" for="title"} + {forminput} + <input type="text" size="35" id="audio_title" name="plugin[mimeaudio][title]" value="{$attachment.meta.title}" /> + {/forminput} +</div> + +<div class="row"> + {formlabel label="Album" for="audio_album"} + {forminput} + <input type="text" size="35" id="audio_album" name="plugin[mimeaudio][album]" value="{$attachment.meta.album}" /> + {/forminput} +</div> + +<div class="row"> + {formlabel label="Artist" for="audio_artist"} + {forminput} + <input type="text" size="35" id="audio_artist" name="plugin[mimeaudio][artist]" value="{$attachment.meta.artist}" /> + {/forminput} +</div> + +<div class="row"> + {formlabel label="Year" for="audio_year"} + {forminput} + <input type="text" size="35" id="audio_year" name="plugin[mimeaudio][year]" value="{$attachment.meta.year}" /> + {/forminput} +</div> + +<div class="row"> + {formlabel label="Genre" for="audio_genre"} + {forminput} + <input type="text" size="35" id="audio_genre" name="plugin[mimeaudio][genre]" value="{$attachment.meta.genre}" /> + {/forminput} +</div> +{/strip} diff --git a/templates/mime_audio_view_inc.tpl b/templates/mime_audio_view_inc.tpl index a7d55e0..bcd3a06 100644 --- a/templates/mime_audio_view_inc.tpl +++ b/templates/mime_audio_view_inc.tpl @@ -50,6 +50,15 @@ </div> {/if} +{if $attachment.meta.genre} + <div class="row"> + {formlabel label="Genre" for=""} + {forminput} + {$attachment.meta.genre} + {/forminput} + </div> +{/if} + {if $attachment.download_url} <div class="row"> {formlabel label="Filename" for=""} diff --git a/templates/mime_view.tpl b/templates/mime_view.tpl index 0edaf38..c02f65a 100644 --- a/templates/mime_view.tpl +++ b/templates/mime_view.tpl @@ -9,6 +9,18 @@ {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="row submit"> + <input type="hidden" name="attachment_id" value="{$smarty.request.attachment_id}" /> + <input type="submit" name="plugin_submit" value="{tr}Update Plugin Data{/tr}" /> + </div> + {/form} + {/if} + {legend legend="Content this attachment belongs to"} <div class="row"> {formlabel label="Title"} |
