Merge branch 'develop' of ssh://git.dsv.su.se/git/scipro/scipro into develop
This commit is contained in:
commit
597bcaa658
src/main/java/se/su/dsv/scipro
checklists/panels
conference/panels
repository/panels
@ -20,6 +20,9 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td wicket:id="emptyLabel" colspan="2"></td>
|
||||
</tr>
|
||||
<tr wicket:id="checkLists">
|
||||
<td><a href="#" wicket:id="checkListLink"><span
|
||||
wicket:id="listName"></span></a></td>
|
||||
|
@ -45,6 +45,7 @@ public class ListCheckListPanel extends Panel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Project project;
|
||||
private final ListView<CheckList> checkLists;
|
||||
private Label emptyLabel;
|
||||
|
||||
public ListCheckListPanel(String id, final CheckListRole role, final Project project) {
|
||||
super(id);
|
||||
@ -60,6 +61,11 @@ public class ListCheckListPanel extends Panel {
|
||||
final WebMarkupContainer container = new WebMarkupContainer("container");
|
||||
container.setOutputMarkupId(true);
|
||||
|
||||
emptyLabel = new Label("emptyLabel", "No checklists has been added to this project yet.");
|
||||
emptyLabel.setOutputMarkupId(true);
|
||||
emptyLabel.setVisible(project.getCheckLists().isEmpty());
|
||||
container.add(emptyLabel);
|
||||
|
||||
container.add(new WebMarkupContainer("removeHeader"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
|
@ -20,6 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="span-22 last" wicket:id="container">
|
||||
<div wicket:id="emptyLabel"></div>
|
||||
<div wicket:id="boardMessageDataView">
|
||||
<div class="rounded-box">
|
||||
<span wicket:id="messageUser"> </span> <span
|
||||
|
@ -58,6 +58,7 @@ public class ConferencePanel extends Panel {
|
||||
private Set<SubscriberModel> subscriberModels;
|
||||
private FeedbackPanel feedbackPanel;
|
||||
private final static int BOARDMESSAGESPERPAGE = 10;
|
||||
private Label emptyLabel;
|
||||
|
||||
public ConferencePanel(String id, IModel<MessageBoard> messageBoardModel,
|
||||
Set<SubscriberModel> subscriberModels, IModel<BoardMessage> boardMessageModel) {
|
||||
@ -89,10 +90,16 @@ public class ConferencePanel extends Panel {
|
||||
int index = boardMessageDao.getBoardMessageSortOrderIndex(boardMessageModel.getObject());
|
||||
dataView.setCurrentPage(index/BOARDMESSAGESPERPAGE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void loadUserDataView(IDataProvider<BoardMessage> boardMessageDataProvider) {
|
||||
|
||||
emptyLabel = new Label("emptyLabel", "Conference is empty.");
|
||||
emptyLabel.setOutputMarkupId(true);
|
||||
webMarkupContainer.add(emptyLabel);
|
||||
emptyLabel.setVisible(boardMessageDataProvider.size()==0);
|
||||
dataView = new DataView<BoardMessage>("boardMessageDataView", boardMessageDataProvider, BOARDMESSAGESPERPAGE) {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -99,9 +99,11 @@
|
||||
|
||||
|
||||
<tbody wicket:id="listFolders">
|
||||
|
||||
<tr>
|
||||
<td wicket:id="emptyFolderLabel" colspan="9">No folders to display</td>
|
||||
</tr>
|
||||
<tr wicket:id="content">
|
||||
|
||||
|
||||
<td><a href="#" wicket:id="link"><img
|
||||
wicket:id="folderIcon" src="#" alt="folderIcon" /> <span
|
||||
wicket:id="name">name</span> </a>
|
||||
@ -122,6 +124,9 @@
|
||||
</tbody>
|
||||
|
||||
<tbody wicket:id="listFiles">
|
||||
<tr>
|
||||
<td wicket:id="emptyFileLabel" colspan="9">No folders to display</td>
|
||||
</tr>
|
||||
<tr wicket:id="content">
|
||||
|
||||
<td>
|
||||
@ -153,12 +158,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td wicket:id="emptyLabel" colspan="9">No files</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
|
@ -52,7 +52,6 @@ public abstract class AbstractFilePanel extends Panel {
|
||||
@SpringBean
|
||||
private FileDescriptionDao fileDescriptionDao;
|
||||
|
||||
private Label emptyLabel;
|
||||
List<FolderDescription> folderItems;
|
||||
List<FileDescription> fileItems;
|
||||
|
||||
@ -161,15 +160,6 @@ public abstract class AbstractFilePanel extends Panel {
|
||||
reloadFolder(absolutePath, relativePath, listFolders);
|
||||
add(listFolders);
|
||||
|
||||
emptyLabel = new Label("emptyLabel", "No files.");
|
||||
emptyLabel.setOutputMarkupId(true);
|
||||
// emptyLabel.setVisible(folderItems.size() == 0 && fileItems.size() == 0);
|
||||
emptyLabel.setVisible(false);
|
||||
add(emptyLabel);
|
||||
|
||||
// folderItems;
|
||||
// fileItems;
|
||||
|
||||
boolean atBasePath = getBasePath().equalsIgnoreCase(absolutePath);
|
||||
int lastSlash = relativePath.lastIndexOf("/");
|
||||
if (lastSlash > 0)
|
||||
@ -203,6 +193,9 @@ public abstract class AbstractFilePanel extends Panel {
|
||||
fileRepository.sortFolderDescriptions(folderItems, sortOrder);
|
||||
RepeatingView contents = new RepeatingView("content");
|
||||
listFolders.add(contents);
|
||||
|
||||
listFolders.add(new Label("emptyFolderLabel", "No folders to display").setVisible(folderItems.isEmpty()));
|
||||
|
||||
for (final FolderDescription folderDescription : folderItems) {
|
||||
WebMarkupContainer inner = new WebMarkupContainer(contents.newChildId());
|
||||
final String linkPath = relativePath + ((!StringUtils.isEmpty(relativePath))?"/":"") + folderDescription.getName();
|
||||
@ -258,6 +251,9 @@ public abstract class AbstractFilePanel extends Panel {
|
||||
|
||||
RepeatingView contents = new RepeatingView("content");
|
||||
listFiles.add(contents);
|
||||
|
||||
listFiles.add(new Label("emptyFileLabel", "No files to display").setVisible(fileItems.isEmpty()));
|
||||
|
||||
for (final FileDescription desc : fileItems) {
|
||||
WebMarkupContainer inner = new WebMarkupContainer(contents.newChildId());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user