Skip to content

Commit

Permalink
Add "before" and "after" flags to periods.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalus committed Jul 14, 2021
1 parent 50ad424 commit b256d1e
Show file tree
Hide file tree
Showing 16 changed files with 105 additions and 52 deletions.
20 changes: 20 additions & 0 deletions src/main/java/org/segrada/controller/PeriodController.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ public Viewable add(
@FormParam("toEntryCalendar") String toEntryCalendar,
@FormParam("fromFuzzyFlagsCa") String fromFuzzyFlagsCa,
@FormParam("fromFuzzyFlagsUncertain") String fromFuzzyFlagsUncertain,
@FormParam("fromFuzzyFlagsBefore") String fromFuzzyFlagsBefore,
@FormParam("fromFuzzyFlagsAfter") String fromFuzzyFlagsAfter,
@FormParam("toFuzzyFlagsCa") String toFuzzyFlagsCa,
@FormParam("toFuzzyFlagsUncertain") String toFuzzyFlagsUncertain,
@FormParam("toFuzzyFlagsBefore") String toFuzzyFlagsBefore,
@FormParam("toFuzzyFlagsAfter") String toFuzzyFlagsAfter,
@FormParam("comment") String comment,
@FormParam("isPeriod") String isPeriodValue,
@FormParam("id") String id
Expand All @@ -113,6 +117,8 @@ public Viewable add(
toEntry = fromEntry;
toFuzzyFlagsCa = fromFuzzyFlagsCa;
toFuzzyFlagsUncertain = fromFuzzyFlagsUncertain;
toFuzzyFlagsBefore = fromFuzzyFlagsBefore;
toFuzzyFlagsAfter = fromFuzzyFlagsAfter;
toEntryCalendar = fromEntryCalendar;
}

Expand Down Expand Up @@ -142,8 +148,12 @@ public Viewable add(
// fuzzy flags
if (fromFuzzyFlagsCa != null) entity.addFuzzyFromFlag('c');
if (fromFuzzyFlagsUncertain != null) entity.addFuzzyFromFlag('?');
if (fromFuzzyFlagsBefore != null) entity.addFuzzyFromFlag('-');
if (fromFuzzyFlagsAfter != null) entity.addFuzzyFromFlag('+');
if (toFuzzyFlagsCa != null) entity.addFuzzyToFlag('c');
if (toFuzzyFlagsUncertain != null) entity.addFuzzyToFlag('?');
if (toFuzzyFlagsBefore != null) entity.addFuzzyToFlag('-');
if (toFuzzyFlagsAfter != null) entity.addFuzzyToFlag('+');

// validate entity
Map<String, String> errors = validate(entity, preValidationErrors);
Expand Down Expand Up @@ -198,8 +208,12 @@ public Response update(
Period entity,
@FormParam("fromFuzzyFlagsCa") String fromFuzzyFlagsCa,
@FormParam("fromFuzzyFlagsUncertain") String fromFuzzyFlagsUncertain,
@FormParam("fromFuzzyFlagsBefore") String fromFuzzyFlagsBefore,
@FormParam("fromFuzzyFlagsAfter") String fromFuzzyFlagsAfter,
@FormParam("toFuzzyFlagsCa") String toFuzzyFlagsCa,
@FormParam("toFuzzyFlagsUncertain") String toFuzzyFlagsUncertain,
@FormParam("toFuzzyFlagsBefore") String toFuzzyFlagsBefore,
@FormParam("toFuzzyFlagsAfter") String toFuzzyFlagsAfter,
@FormParam("isPeriod") String isPeriodValue
) {
// period or point of time?
Expand All @@ -209,13 +223,19 @@ public Response update(
entity.setToEntryCalendar(entity.getFromEntryCalendar());
toFuzzyFlagsCa = fromFuzzyFlagsCa;
toFuzzyFlagsUncertain = fromFuzzyFlagsUncertain;
toFuzzyFlagsBefore = fromFuzzyFlagsBefore;
toFuzzyFlagsAfter = fromFuzzyFlagsAfter;
}

// fuzzy flags
if (fromFuzzyFlagsCa != null) entity.addFuzzyFromFlag('c'); else entity.deleteFuzzyFromFlag('c');
if (fromFuzzyFlagsUncertain != null) entity.addFuzzyFromFlag('?'); else entity.deleteFuzzyFromFlag('?');
if (fromFuzzyFlagsBefore != null) entity.addFuzzyFromFlag('-'); else entity.deleteFuzzyFromFlag('-');
if (fromFuzzyFlagsAfter != null) entity.addFuzzyFromFlag('+'); else entity.deleteFuzzyFromFlag('+');
if (toFuzzyFlagsCa != null) entity.addFuzzyToFlag('c'); else entity.deleteFuzzyToFlag('c');
if (toFuzzyFlagsUncertain != null) entity.addFuzzyToFlag('?'); else entity.deleteFuzzyToFlag('?');
if (toFuzzyFlagsBefore != null) entity.addFuzzyToFlag('-'); else entity.deleteFuzzyToFlag('-');
if (toFuzzyFlagsAfter != null) entity.addFuzzyToFlag('+'); else entity.deleteFuzzyToFlag('+');

Response response = handleUpdate(entity, service);
if (response.getStatus() != 200) { // redirect means that element has been saved successfully
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/org/segrada/model/util/FuzzyFlag.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
*/
public enum FuzzyFlag {
FUZZY_CA('c'), // ca prefix
FUZZY_UNKNOWN('?'); // ? suffix
FUZZY_UNKNOWN('?'), // ? suffix
FUZZY_BEFORE('-'), // before prefix
FUZZY_AFTER('+'); // after suffix

private final char fuzzyValue;

Expand All @@ -43,6 +45,8 @@ public static FuzzyFlag translateCharToFuzzyFlag(char flag) {
switch (flag) {
case 'c': return FUZZY_CA;
case '?': return FUZZY_UNKNOWN;
case '-': return FUZZY_BEFORE;
case '+': return FUZZY_AFTER;
default: break;
}
return null;
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/org/segrada/util/FuzzyDateRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Fuzzy Date Renderer to print out fuzzy dates nicely
*/
public final class FuzzyDateRenderer {
private FuzzyDateRenderer() throws InstantiationException{
private FuzzyDateRenderer() throws InstantiationException {
throw new InstantiationException("The class is not created for instantiation");
}

Expand All @@ -30,13 +30,15 @@ private FuzzyDateRenderer() throws InstantiationException{
* @param fuzzyFlags char[] array of fuzzy flags to render with
* @return
*/
public static String render(int julianDate, String dateString, String calendar, char[] fuzzyFlags) {
public static String render(int julianDate, String dateString, String calendar, char[] fuzzyFlags, String before, String after) {
// no further work wirg empty values
if (dateString == null || dateString.isEmpty()) return "";

if (fuzzyFlags != null)
for (char flag : fuzzyFlags)
switch (flag) {
case '-': dateString = before + ' ' + dateString; break; // add before prefix
case '+': dateString = after + ' ' + dateString; break; // add after prefix
case 'c': dateString = '~' + dateString; break; // add ca. prefix
case '?': dateString += '?'; break; // add ? suffix
default: break;
Expand Down Expand Up @@ -64,17 +66,17 @@ public static String render(int julianDate, String dateString, String calendar,
* @return
*/
public static String renderFromTo(int fromJulianDate, String fromDateString, String fromCalendar, char[] fromFuzzyFlags,
int toJulianDate, String toDateString, String toCalendar, char[] toFuzzyFlags) {
int toJulianDate, String toDateString, String toCalendar, char[] toFuzzyFlags, String before, String after) {
// avoid NPEs
if (fromDateString == null) fromDateString = "";
if (toDateString == null) toDateString = "";

// render only one date, if same
if (fromDateString.equals(toDateString)) return render(fromJulianDate, fromDateString, fromCalendar, fromFuzzyFlags);
if (fromDateString.equals(toDateString)) return render(fromJulianDate, fromDateString, fromCalendar, fromFuzzyFlags, before, after);

// render two dates
String from = render(fromJulianDate, fromDateString, fromCalendar, fromFuzzyFlags);
String to = render(toJulianDate, toDateString, toCalendar, toFuzzyFlags);
String from = render(fromJulianDate, fromDateString, fromCalendar, fromFuzzyFlags, before, after);
String to = render(toJulianDate, toDateString, toCalendar, toFuzzyFlags, before, after);

return from + " &ndash; " + to;
}
Expand All @@ -87,8 +89,8 @@ public static String renderFromTo(int fromJulianDate, String fromDateString, Str
* @param fuzzyFlags char[] array of fuzzy flags to render with
* @return
*/
public static String renderOrEmpty(int julianDate, String dateString, String calendar, char[] fuzzyFlags) {
String fuzzyDate = render(julianDate, dateString, calendar, fuzzyFlags);
public static String renderOrEmpty(int julianDate, String dateString, String calendar, char[] fuzzyFlags, String before, String after) {
String fuzzyDate = render(julianDate, dateString, calendar, fuzzyFlags, before, after);
return fuzzyDate.isEmpty()?"---":fuzzyDate;
}
}
2 changes: 2 additions & 0 deletions src/main/webapp/WEB-INF/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ period.format=Date format\: dd.mm.yyyy (dd and mm optional)
period.fuzzyCa=ca
period.fuzzyInfo=Date annotation
period.fuzzyUncertain=uncertain
period.fuzzyBefore=pre
period.fuzzyAfter=post
Periods=Periods
Pictogram=Pictogram
Pictograms=Pictograms
Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/WEB-INF/i18n/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ period.format=Datumsformat\: tt.mm.jjjj (tt und mm optional)
period.fuzzyCa=ca.
period.fuzzyInfo=Datumszusatz
period.fuzzyUncertain=unsicher
period.fuzzyBefore=vor
period.fuzzyAfter=nach
Periods=Zeitpunkte/-r\u00E4ume
Pictogram=Piktogramm
Pictograms=Piktogramme
Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/WEB-INF/i18n/messages_ro.properties
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ Tags=Taguri
# period.calendarInfo=Calendar system to use
# period.fuzzyCa=ca
# period.fuzzyUncertain=uncertain
# period.fuzzyBefore=before
# period.fuzzyAfter=after
# period.fuzzyInfo=Date annotation
# Login=Login
Login.title=Va rugam sa va creati cont
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/templates/node/by_tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ <h4 class="sg-control-header"><i class="fa fa-dot-circle-o"></i> <span th:text="
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.pictogram.uid})}" th:alt-title="${entity.pictogram.title}" alt="" width="24" height="24" th:if="${entity.pictogram}"/>
</td>
<td th:text="${entity.title}">Title</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags)}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags)}">Stop</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</td>
<td class="sg-taglist-contract">
<div th:replace="partials/common :: taglist (tags=${entity.tags})"></div>
</td>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/templates/node/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ <h4 class="sg-control-header"><i class="fa fa-dot-circle-o"></i> <span th:text="
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.pictogram.uid})}" th:alt-title="${entity.pictogram.title}" alt="" width="24" height="24" th:if="${entity.pictogram}"/>
</td>
<td th:text="${entity.title}">Title</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags)}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags)}">Stop</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</td>
<td th:if="${identity.hasAccess('TAG')}" class="sg-taglist-contract">
<div th:replace="partials/common :: taglist (tags=${entity.tags})"></div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/templates/node/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h4 class="sg-data-header">
<span class="sg-color-icon" th:style="'background-color: ' + ${entity.colorCode}" th:if="${entity.color}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.pictogram.uid})}" th:alt-title="${entity.pictogram.title}" alt="" width="24" height="24" th:if="${entity.pictogram}"/>
<span th:text="${entity.title}">Node</span>
<small th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderFromTo(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags)}">0000 &ndash; 9999</small>
<small th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderFromTo(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">0000 &ndash; 9999</small>
</h4>

<ul class="nav nav-tabs" role="tablist">
Expand Down
20 changes: 16 additions & 4 deletions src/main/webapp/WEB-INF/templates/partials/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ <h3>List of Periods</h3>
<th></th>
</tr>
<tr th:each="myPeriod : ${entity.periods}" th:id="${'sg-period-' + myPeriod.uid}">
<td th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(myPeriod.fromJD,myPeriod.fromEntry,myPeriod.fromEntryCalendar,myPeriod.fuzzyFromFlags)}">Start</td>
<td th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(myPeriod.toJD,myPeriod.toEntry,myPeriod.toEntryCalendar,myPeriod.fuzzyToFlags)}">Stop</td>
<td th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(myPeriod.fromJD,myPeriod.fromEntry,myPeriod.fromEntryCalendar,myPeriod.fuzzyFromFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</td>
<td th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(myPeriod.toJD,myPeriod.toEntry,myPeriod.toEntryCalendar,myPeriod.fuzzyToFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</td>
<td th:text="${myPeriod.comment}">Comment</td>
<td class="text-right">
<div class="sg-data-icon-bar" role="group" aria-label="Actions">
Expand Down Expand Up @@ -156,18 +156,30 @@ <h4>Period form</h4>
<div class="col-md-3">
<label class="checkbox-inline">
<input type="checkbox" name="fromFuzzyFlagsCa" value="c" th:checked="${period} and ${period.hasFuzzyFromFlag('c')}" /> <span th:text="#{period.fuzzyCa}">ca.</span>
</label>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="fromFuzzyFlagsUncertain" value="?" th:checked="${period} and ${period.hasFuzzyFromFlag('?')}" /> <span th:text="#{period.fuzzyUncertain}">ca.</span>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="fromFuzzyFlagsBefore" value="-" th:checked="${period} and ${period.hasFuzzyFromFlag('-')}" /> <span th:text="#{period.fuzzyBefore}">ca.</span>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="fromFuzzyFlagsAfter" value="+" th:checked="${period} and ${period.hasFuzzyFromFlag('+')}" /> <span th:text="#{period.fuzzyAfter}">ca.</span>
</label>
</div>
<div class="col-md-2"></div>
<div class="col-md-3">
<label class="checkbox-inline">
<input type="checkbox" name="toFuzzyFlagsCa" value="c" th:checked="${period} and ${period.hasFuzzyToFlag('c')}" /> <span th:text="#{period.fuzzyCa}">ca.</span>
</label>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="toFuzzyFlagsUncertain" value="?" th:checked="${period} and ${period.hasFuzzyToFlag('?')}" /> <span th:text="#{period.fuzzyUncertain}">ca.</span>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="toFuzzyFlagsBefore" value="-" th:checked="${period} and ${period.hasFuzzyToFlag('-')}" /> <span th:text="#{period.fuzzyBefore}">ca.</span>
</label><br />
<label class="checkbox-inline">
<input type="checkbox" name="toFuzzyFlagsAfter" value="+" th:checked="${period} and ${period.hasFuzzyToFlag('+')}" /> <span th:text="#{period.fuzzyAfter}">ca.</span>
</label>
</div>
<div class="col-md-4"><small th:text="#{period.fuzzyInfo}" class="text-muted">(Fuzzy date)</small></div>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/templates/period/updateSuccess.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div class="alert alert-success" role="alert" th:text="#{periodChanged}">Successfully updated!</div>

<div class="sg-update-period hidden" th:attr="data-id=${'#sg-period-' + entity.uid}">
<div th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.fromJD,entity.fromEntry,entity.fromEntryCalendar,entity.fuzzyFromFlags)}">Start</div>
<div th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.toJD,entity.toEntry,entity.toEntryCalendar,entity.fuzzyToFlags)}">Stop</div>
<div th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.fromJD,entity.fromEntry,entity.fromEntryCalendar,entity.fuzzyFromFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</div>
<div th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.toJD,entity.toEntry,entity.toEntryCalendar,entity.fuzzyToFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</div>
<div th:text="${entity.comment}">Comment</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/templates/relation/by_tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ <h4 class="sg-control-header"><i class="fa fa-chain"></i> <span th:text="#{Relat
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.pictogram.uid})}" th:alt-title="${entity.pictogram.title}" alt="" width="24" height="24" th:if="${entity.pictogram}"/>
</td>
<td th:text="${entity.title}">Title</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags)}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags)}">Stop</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</td>
<td class="text-right">
<div class="sg-data-icon-bar" role="group" aria-label="Actions" sg:strip-whitespace>
<a th:if="${identity.hasAccess('GRAPH')}" href="#" th:href="@{/relation/graph/{uid}(uid=${entity.uid})}" type="button" class="sg-graph-update sg-data-icon" aria-label="Graph" th:title="#{AddToGraph}" th:attr="aria-label=#{AddToGraph}"><i class="fa fa-share"></i></a>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/templates/relation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ <h4 class="sg-control-header"><i class="fa fa-chain"></i> <span th:text="#{list.
<img src="#" th:src="@{/pictogram/file/{uid}(uid=${entity.pictogram.uid})}" th:alt-title="${entity.pictogram.title}" alt="" width="24" height="24" th:if="${entity.pictogram}"/>
</td>
<td th:text="${hasNode && #strings.equals(nodeUid, entity.toEntity.uid)}? ${entity.reversedTitle} : ${entity.title}">Title</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags)}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags)}">Stop</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.minJD,entity.minEntry,entity.minEntryCalendar,entity.fuzzyMinFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Start</td>
<td th:if="${identity.hasAccess('PERIOD')}" th:utext="${@org.segrada.util.FuzzyDateRenderer@renderOrEmpty(entity.maxJD,entity.maxEntry,entity.maxEntryCalendar,entity.fuzzyMaxFlags, #messages.msg('period.fuzzyBefore'), #messages.msg('period.fuzzyAfter'))}">Stop</td>
<td class="text-right">
<div class="sg-data-icon-bar" role="group" aria-label="Actions" sg:strip-whitespace>
<a th:if="${identity.hasAccess('GRAPH')}" href="#" th:href="@{/relation/graph/{uid}(uid=${entity.uid})}" type="button" class="sg-graph-update sg-data-icon" aria-label="Graph" th:title="#{AddToGraph}" th:attr="aria-label=#{AddToGraph}"><i class="fa fa-share"></i></a>
Expand Down
Loading

0 comments on commit b256d1e

Please sign in to comment.