Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
7d1d4299
Commit
7d1d4299
authored
15 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
LMS-1231 render DateTableCell as everywhere else
SVN: 13105
parent
800d22bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/data/DataSetReportColumnDefinition.java
+18
-12
18 additions, 12 deletions
.../columns/specific/data/DataSetReportColumnDefinition.java
with
18 additions
and
12 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/data/DataSetReportColumnDefinition.java
+
18
−
12
View file @
7d1d4299
...
...
@@ -16,9 +16,11 @@
package
ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.data
;
import
ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.renderers.SimpleDateRenderer
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.GridRowModel
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.IColumnDefinition
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.URLMethodWithParameters
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.DateTableCell
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.ISerializableComparable
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.ImageTableCell
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelColumnHeader
;
...
...
@@ -60,20 +62,24 @@ public class DataSetReportColumnDefinition implements IColumnDefinition<TableMod
public
String
getValue
(
GridRowModel
<
TableModelRow
>
rowModel
)
{
ISerializableComparable
cell
=
getCellValue
(
rowModel
);
if
(
cell
instanceof
ImageTableCell
==
false
)
if
(
cell
instanceof
ImageTableCell
)
{
return
cell
.
toString
();
ImageTableCell
imageCell
=
(
ImageTableCell
)
cell
;
URLMethodWithParameters
methodWithParameters
=
new
URLMethodWithParameters
(
downloadURL
+
"/datastore_server/"
+
imageCell
.
getPath
());
methodWithParameters
.
addParameter
(
"sessionID"
,
sessionID
);
String
linkURL
=
methodWithParameters
.
toString
();
methodWithParameters
.
addParameter
(
"mode"
,
"thumbnail"
+
imageCell
.
getMaxThumbnailWidth
()
+
"x"
+
imageCell
.
getMaxThumbnailHeight
());
String
imageURL
=
methodWithParameters
.
toString
();
return
"<div align='center'><a class='link-style' href='"
+
linkURL
+
"' target='_blank'><img src='"
+
imageURL
+
"' alt='"
+
cell
.
toString
()
+
"'/></a></div>"
;
}
ImageTableCell
imageCell
=
(
ImageTableCell
)
cell
;
URLMethodWithParameters
methodWithParameters
=
new
URLMethodWithParameters
(
downloadURL
+
"/datastore_server/"
+
imageCell
.
getPath
());
methodWithParameters
.
addParameter
(
"sessionID"
,
sessionID
);
String
linkURL
=
methodWithParameters
.
toString
();
methodWithParameters
.
addParameter
(
"mode"
,
"thumbnail"
+
imageCell
.
getMaxThumbnailWidth
()
+
"x"
+
imageCell
.
getMaxThumbnailHeight
());
String
imageURL
=
methodWithParameters
.
toString
();
return
"<div align='center'><a class='link-style' href='"
+
linkURL
+
"' target='_blank'><img src='"
+
imageURL
+
"' alt='"
+
cell
.
toString
()
+
"'/></a></div>"
;
if
(
cell
instanceof
DateTableCell
)
{
return
SimpleDateRenderer
.
renderDate
(((
DateTableCell
)
cell
).
getDateTime
());
}
return
cell
.
toString
();
}
public
boolean
isNumeric
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment