mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Showing the image editor for the local files only
--HG-- branch : 1.x
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Placement>
|
||||
|
||||
<Match DisplayType="SummaryAdmin">
|
||||
<Place Parts_Image_Editor="Header" />
|
||||
<Place Parts_Image_Editor="Footer:6" />
|
||||
</Match>
|
||||
|
||||
<!-- ImagePart -->
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
@using Orchard.MediaLibrary.Models
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.MediaLibrary.Models
|
||||
@{
|
||||
ImagePart imagePart = Model.ContentPart;
|
||||
|
||||
// do not show the editor if the image is not local
|
||||
if (!imagePart.As<MediaPart>().Resource.StartsWith("~/")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Html.ActionLink(T("Edit").Text, "Index", "Admin", new { id = imagePart.Id, area = "Orchard.ImageEditor" }, new { id="edit-image-link"})
|
||||
@Html.ActionLink(T("Image Editor").Text, "Index", "Admin", new { id = imagePart.Id, area = "Orchard.ImageEditor" }, new { id="edit-image-link", @class="button"})
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user