mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Renaming shape and adding a hint
--HG-- branch : 1.x extra : rebase_source : 4d74199aa85e9194ae579959cab33a6a2740310c
This commit is contained in:
@@ -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)) {
|
||||
|
@@ -22,24 +22,26 @@
|
||||
<th scope="col" class="actions"> </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" })*@
|
||||
|
Reference in New Issue
Block a user