18 package org.turro.elephant.impl.context.vc;
21 import java.io.IOException;
22 import java.util.Date;
23 import java.util.TreeSet;
24 import org.turro.string.Strings;
25 import org.turro.action.Contacts;
26 import org.turro.elephant.context.IElement;
27 import org.turro.html.HTMLForm;
28 import org.turro.i18n.I_;
37 private int copies, delay;
52 public void renderVersions(String tableAttr, String formAttr)
throws IOException {
53 Date today =
new Date();
55 if(Strings.isBlank(tableAttr)) {
56 hf.
startTag(
"div",
"id='control-version'");
58 if(Strings.isBlank(formAttr)) {
63 hf.
startTable(Strings.isBlank(tableAttr) ?
"" : tableAttr);
64 boolean doCommand =
false;
68 hf.
doTag(
"span",
"class='file-version'");
94 hf.
command(
"remove-files",
I_.
get(
"Remove selected"),
"",
"javascript:return confirm('" +
I_.
get(
"Ready to delete selection?") +
"')");
105 for(
int i = 0; i < files.length; i++) {
112 private void fillFiles() {
114 for(
int i = 0; i < files.length; i++) {
115 if(files[i].isFile() && files[i].getName().endsWith(
".wiki")) {
119 String name =
"", lang =
"";
120 FileProperties lastFp =
null;
121 for(FileProperties fp :
this) {
123 if(!name.equals(fp.getName()) || !lang.equals(fp.getLang())) {
124 if(lastFp !=
null) lastFp.setLastEntry(
true);
131 if(lastFp !=
null) lastFp.setLastEntry(
true);
void renderVersions(String tableAttr, String formAttr)
FileVersionControl(IElement iel, int copies, int delay)
void writeDate(Date date, String mode)
HTMLGenerator endAllTags()
HTMLGenerator doTag(String tag)
HTMLGenerator endTableRow()
HTMLGenerator startTag(String tag)
HTMLGenerator endTableCol()
HTMLGenerator startTableCol(String attributes)
HTMLGenerator startTable(String attributes)
HTMLGenerator write(String value)
static String byKey(String key)
static String get(String msg)
String getParameter(String param)
boolean isInRole(String role)
IConstructor getConstructor()
boolean isThisUser(String id)