Set current version as Yes/No
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@144457 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e5b5e6fc14
commit
38dc84a74b
|
@ -281,7 +281,7 @@ public class VersioningInfoContainer extends LayoutContainer {
|
||||||
//ColumnConfig deleteDate = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEDATE.toString(), "Deleted Date", 90);
|
//ColumnConfig deleteDate = createSortableColumnConfig(FileTrashedModel.STOREINFO.DELETEDATE.toString(), "Deleted Date", 90);
|
||||||
//deleteDate.setDateTimeFormat(DateTimeFormat.getFormat("dd MMM hh:mm aaa yyyy"));
|
//deleteDate.setDateTimeFormat(DateTimeFormat.getFormat("dd MMM hh:mm aaa yyyy"));
|
||||||
ColumnConfig user = createSortableColumnConfig(FileVersionModel.USER_VERSIONING, "User", 130);
|
ColumnConfig user = createSortableColumnConfig(FileVersionModel.USER_VERSIONING, "User", 130);
|
||||||
ColumnConfig currVersion = createSortableColumnConfig(FileVersionModel.IS_CURRENT_VERSION, "Current Version", 80);
|
ColumnConfig currVersion = createSortableColumnConfig(FileVersionModel.IS_CURRENT_VERSION, "Current Version", 75);
|
||||||
|
|
||||||
ColumnModel cm = new ColumnModel(Arrays.asList(name, created, user, currVersion));
|
ColumnModel cm = new ColumnModel(Arrays.asList(name, created, user, currVersion));
|
||||||
|
|
||||||
|
@ -311,7 +311,6 @@ public class VersioningInfoContainer extends LayoutContainer {
|
||||||
String color = "black";
|
String color = "black";
|
||||||
|
|
||||||
if(val!=null && isCurrVersion != null && isCurrVersion){
|
if(val!=null && isCurrVersion != null && isCurrVersion){
|
||||||
// color = "#EEC900";
|
|
||||||
return "<span qtitle='" + columnModel.getColumnById(property).getHeader() + "' qtip='" + val + "' style='font-weight: bold;color:" + color + "'>" + val + "</span>";
|
return "<span qtitle='" + columnModel.getColumnById(property).getHeader() + "' qtip='" + val + "' style='font-weight: bold;color:" + color + "'>" + val + "</span>";
|
||||||
}else{
|
}else{
|
||||||
if(val==null)
|
if(val==null)
|
||||||
|
@ -325,16 +324,12 @@ public class VersioningInfoContainer extends LayoutContainer {
|
||||||
@Override
|
@Override
|
||||||
public String render(FileVersionModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<FileVersionModel> store, Grid<FileVersionModel> grid) {
|
public String render(FileVersionModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<FileVersionModel> store, Grid<FileVersionModel> grid) {
|
||||||
Boolean isCurrVersion = model.isCurrentVersion();
|
Boolean isCurrVersion = model.isCurrentVersion();
|
||||||
String val = model.get(property);
|
//String val = model.get(property);
|
||||||
String color = "black";
|
|
||||||
|
|
||||||
if(val!=null && isCurrVersion != null && isCurrVersion){
|
if(isCurrVersion != null && isCurrVersion){
|
||||||
// color = "#EEC900";
|
return "<span>Yes</span>";
|
||||||
return "<span qtitle='This is current version' qtip='" + val + ">Yes</span>";
|
|
||||||
}else{
|
}else{
|
||||||
if(val==null)
|
return "<span>No</span>";
|
||||||
val = "";
|
|
||||||
return "<span qtitle='This is a previous version' qtip='" + val + "' style='color:" + color + "'>No</span>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue