Renaming shape and adding a hint

--HG--
branch : 1.x
extra : rebase_source : 4d74199aa85e9194ae579959cab33a6a2740310c
This commit is contained in:
Sebastien Ros
2013-03-04 11:51:22 -08:00
parent c2cf232534
commit 833093c9aa
2 changed files with 19 additions and 17 deletions

View File

@@ -44,7 +44,7 @@ namespace Orchard.MediaProcessing.Shapes {
public ILogger Logger { get; set; }
[Shape]
public void ImageUrl(dynamic Display, TextWriter Output, string Profile, string Path, ContentItem ContentItem) {
public void MediaUrl(dynamic Display, TextWriter Output, string Profile, string Path, ContentItem ContentItem) {
var filePath = _fileNameProvider.Value.GetFileName(Profile, Path);
// todo: regenerate the file if the profile is newer, by getting IStorageFile.
if (string.IsNullOrEmpty(filePath) || !_storageProvider.Value.FileExists(filePath)) {

View File

@@ -22,24 +22,26 @@
<th scope="col" class="actions">&nbsp;</th>
</tr>
</thead>
@foreach (var filter in Model.Filters)
{
<tr>
<td>@filter.DisplayText</td>
<td>
@Html.ActionLink(T("Edit").Text, "Edit", new { controller = "Filter", id = Model.Id, category = filter.Category, type = filter.Type, filterId = filter.FilterRecordId }) |
@Html.ActionLink(T("Delete").Text, "Delete", new { controller = "Filter", id = Model.Id, filterId = filter.FilterRecordId }, new { itemprop = "RemoveUrl UnsafeUrl" }) |
@if (filter != Model.Filters.First()) {
@Html.ActionLink(T("Up").Text, "Move", new { controller = "Admin", id = Model.Id, direction = "up", filterId = filter.FilterRecordId }) @:|
}
@if (filter != Model.Filters.Last()) {
@Html.ActionLink(T("Down").Text, "Move", new { controller = "Admin", id = Model.Id, direction = "down", filterId = filter.FilterRecordId })
}
@foreach (var filter in Model.Filters)
{
<tr>
<td>@filter.DisplayText</td>
<td>
@Html.ActionLink(T("Edit").Text, "Edit", new { controller = "Filter", id = Model.Id, category = filter.Category, type = filter.Type, filterId = filter.FilterRecordId }) |
@Html.ActionLink(T("Delete").Text, "Delete", new { controller = "Filter", id = Model.Id, filterId = filter.FilterRecordId }, new { itemprop = "RemoveUrl UnsafeUrl" }) |
@if (filter != Model.Filters.First()) {
@Html.ActionLink(T("Up").Text, "Move", new { controller = "Admin", id = Model.Id, direction = "up", filterId = filter.FilterRecordId }) @:|
}
@if (filter != Model.Filters.Last()) {
@Html.ActionLink(T("Down").Text, "Move", new { controller = "Admin", id = Model.Id, direction = "down", filterId = filter.FilterRecordId })
}
</td>
</tr>
}
</td>
</tr>
}
</table>
<span class="hint">@T("Usage example: ")@("@Display.MediaUrl(Profile: \"")@Model.Name@("\", Path: Model.ContentItem.Contact.Picture.Url)")</span>
<fieldset>
@*@Html.ActionLink(T("Preview").ToString(), "Preview", new { Model.Id }, new { @class = "button" })*@