-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a separate file for the information on a wiki image
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!-- Information about an image | ||
- Copyright (C) 2016, 2018, 2019 Stephane Carrez | ||
- Written by Stephane Carrez (Stephane.Carrez@gmail.com) | ||
- | ||
- Licensed under the Apache License, Version 2.0 (the "License"); | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- http://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
--> | ||
<div class="wiki-image-info" | ||
xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:f="http://java.sun.com/jsf/core" | ||
xmlns:c="http://java.sun.com/jstl/core" | ||
xmlns:util="http://code.google.com/p/ada-asf/util" | ||
xmlns:h="http://java.sun.com/jsf/html"> | ||
<div class="grid_6"> | ||
<dl class="wiki-image-details"> | ||
<dt>#{wikiMsg.wiki_image_file_label}</dt> | ||
<dd>#{wikiImageInfo.folder_name}/#{wikiImageInfo.name}</dd> | ||
<h:panelGroup rendered="#{wikiImageInfo.id gt 0 and wikiImageInfo.list.count != 0}"> | ||
<dt>#{wikiMsg.wiki_image_file_size_label}</dt> | ||
<dd> | ||
<h:outputText value="#{wikiImageInfo.file_size}"> | ||
<f:converter converterId="sizeConverter"/> | ||
</h:outputText> | ||
</dd> | ||
<dt>#{wikiMsg.wiki_image_date_label}</dt> | ||
<dd> | ||
<h:outputText value="#{wikiImageInfo.create_date}"> | ||
<f:converter converterId="smartDateConverter"/> | ||
</h:outputText> | ||
</dd> | ||
<dt>#{wikiMsg.wiki_image_mime_label}</dt> | ||
<dd>#{wikiImageInfo.mime_type}</dd> | ||
<dt>#{wikiMsg.wiki_image_resolution_label}</dt> | ||
<dd> | ||
<div class="wiki-image-view"> | ||
|
||
<h:list var="img" value="#{wikiImageInfo.list}"> | ||
<a href="#{wikiImageInfo.imageUrl}"> | ||
<span> | ||
<h:outputFormat value="#{wikiMsg.wiki_image_dimension}"> | ||
<f:param value="#{img.width}"/> | ||
<f:param value="#{img.height}"/> | ||
</h:outputFormat> | ||
</span> | ||
<span>(<h:outputText value="#{img.file_size}"> | ||
<f:converter converterId="sizeConverter"/> | ||
</h:outputText>) | ||
</span> | ||
</a> | ||
</h:list> | ||
</div> | ||
</dd> | ||
</h:panelGroup> | ||
<h:panelGroup rendered="#{wikiImageInfo.id le 0 or wikiImageInfo.list.count == 0}"> | ||
<dd>#{wikiMsg.wiki_image_missing_message}</dd> | ||
</h:panelGroup> | ||
</dl> | ||
</div> | ||
<div class="grid_6"> | ||
<div class='storage-upload'> | ||
<a id="storage-reupload-button" class="awa-button"> | ||
#{storageMsg.storage_upload_new_image_version_label} | ||
</a> | ||
</div> | ||
<util:script> | ||
$("#storage-reupload-button").uploader({ | ||
acceptedFiles: "image/jpeg,image/png,image/gif,image/svg+xml", | ||
folderId: "#{wikiImageInfo.folder_id}", | ||
fileId: "#{wikiImageInfo.id}", | ||
uploadUrl: '#{contextPath}/storages/forms/upload-image.html', | ||
uploadDoneAction: function() { | ||
document.location = document.location; | ||
}, | ||
dictDefaultMessage: "#{util:escapeJavaScript(storageMsg.storage_upload_form_message)}", | ||
dictInvalidFileType: "#{util:escapeJavaScript(storageMsg.storage_upload_form_invalid_file_message)}" | ||
}); | ||
</util:script> | ||
</div> | ||
|
||
</div> | ||
|
||
|