-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Story/vspc 190 A user should be able to define the order spaces appear in the site menu of the public page #277
Closed
Closed
Changes from 77 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
df573df
[VSPC-190] Added sorting functionality for space
glend17 89b4f23
[VSPC-190] added custom ordering layout page
glend17 cead54f
[VSPC-190] Changed the logic for custom order to input values given b…
glend17 2a4e021
[VSPC-190] Added custom order logic for spaces
glend17 1ac9e32
[VSPC-190] Added controller to adjust content order and front end cha…
glend17 bd2eeb0
[VSPC-190] Spaces custom order controller related changes
glend17 16fa151
[VSPC-190] Front-end changes
glend17 8a5f860
[VSPC-190] Front-end space list implementation and back end bug fixes
glend17 0af04b2
[VSPC-190] Added re-ordering of spaces
glend17 0f0fcdb
[VSPC-190] Space ordering option on staff page integrated to backend
glend17 04c4946
[VSPC-190] Dropdown will show current selected element
glend17 d1b6405
[VSPC-190] Unit test
glend17 2a4cdfc
[VSPC-190] Unit Test
glend17 e0a9a54
[VSPC-190] Unit tests
glend17 3aea6df
[VSPC-190] Cleanup
glend17 b94a0d0
[VSPC-190] Code documentation
glend17 d513eba
Update SpacesCustomOrderManagerTest.java
glend17 ac362db
Update SpaceController.java
glend17 87ec41c
Update SpacesCustomOrderingController.java
glend17 eec41be
[VSPC-190] Removing SpaceOrderTypeFrom as unused code
glend17 bc61545
[VSPC-190] Review Comment, reusing method getStartExhibition()
glend17 a585211
[VSPC-190] allowing scope for multiple custom order
glend17 fa48ecf
[VSPC-190] Added logic to support multiple custom orders
glend17 ad4271d
[VSPC-190] Space custom order changes
glend17 f546ebc
[VSPC-190] Custom order html pages
glend17 bf06c53
[VSPC-190] displaying the space orders
glend17 4d5ea90
[VSPC-190] enabled drag and drop for space ordering
glend17 137a2fc
[VSPC-190] staff side display custom order
glend17 5a5fc21
[VSPC-190] findBySpaceCustomOrderName
glend17 23f348d
[VSPC-190] List space orders
glend17 47cad20
[VSPC-190] bug on delete custom order
glend17 45dabaf
[VSPC-190] changes based on manual flow testing
glend17 306b76a
[VSPC-190] adding private field
glend17 300633d
[VSPC-190] code cleanup
glend17 60896b3
[VSPC-190] code cleanup
glend17 6e30a2f
[VSPC-190] adding unit tests
glend17 8ff419d
[VSPC-190] code cleanup
glend17 78bc28a
[VSPC-190] merge with develop branch
glend17 ba4e9a8
[VSPC-190] allowing space custom order with same name
glend17 006f921
[VSPC-190] allowing space custom order with same name
glend17 99862b8
[VSPC-190] Implemented PR review comments
tusanand b6770bd
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 733a33d
[VSPC-190] Added back updateSpaceOrderMode
tusanand 8ff6c84
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 5d29c8c
Merge branch 'story/vspc-190' of https://github.com/diging/virtual-sp…
tusanand 3181473
[VSPC-190] Implemented review comment related changes
tusanand 10b44cf
[VSPC-190] Updated HTML for add new custom order page
tusanand 479a02c
[VSPC-190] Modified UI for custom ordering page.
tusanand 5296a30
[VSPC-190] Added back button to navigate on the add new custom order …
tusanand 7e0a573
[VSPC-190] Updated UI for the individual custom order page
tusanand 0dbc3b1
[VSPC-190] Modified backend code to update title and description toge…
tusanand 2438591
[VSPC-190] Modified UI for edit page
tusanand 5b7dac3
[VSPC-190] Modified the edit page
tusanand ab17dae
VSPC-190 Fixed indentation issue
tusanand 2104cda
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 89c8711
[VSPC-190] PR review comments incorporated
tusanand f3eb69e
[VSPC-190] PR review comments incorporated
tusanand 0703107
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 45b5bf6
[VSPC-190] Update function names and replaced loops with stream
tusanand 6ab4060
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 0a9308f
[VSPC-190] Added test cases
tusanand 00b2644
[VSPC-190] converted custom order save, edit and delete to HTML forms
tusanand a380c84
[VSPC-190] moved the request mapping to a new controller
tusanand d9cac62
Merge branch 'develop' of https://github.com/diging/virtual-spaces-2.…
tusanand 981c87c
[VSPC-190] review comments
pkharge 1f6e703
[VSPC-190] review comments
pkharge e3f9bca
Merge branch 'develop' into story/VSPC-190
pkharge d43e7b7
[story/VSPC-190] review comments
pkharge 04b1064
[VSPC-190] test case fix
pkharge 0f01276
Merge branch 'develop' into story/vspc-190
pooja-thalur f8a56c4
[VSPC-190] removed css for customlink
pooja-thalur ba010d7
[VSPC-190] addressed review comments
pooja-thalur 5b42ecf
[VSPC-216] fixed dropdown
pooja-thalur 1861299
[VSPC-190] fixed bug on saving custom order
pooja-thalur 743dab4
[VSPC-190] addressed review comments
pooja-thalur 48d75cb
[VSPC-190] addressed review comment
pooja-thalur 53212f5
[VSPC-190] codefactor issue fixed
pooja-thalur 9813163
[VSPC-190] addressed pr comments
pooja-thalur 780df95
[VSPC-190] addressed pr comments
pooja-thalur 341fec2
[VSPC-190] addressed review comments
pooja-thalur a073f66
[VSPC-190] code cleanup
pooja-thalur 5344d3f
[VSPC-190] changed UI of edit page for custom ordering of spaces
pooja-thalur f252c4f
[VSPC-190] addressed review comments
pooja-thalur 9b383fe
[VSPC-190] adding validation
pooja-thalur 6635426
[VSPC-190] addressed review comments
pooja-thalur b5a0ff5
[VSPC-190] addressed review comments
pooja-thalur c7c8bd7
Merge branch 'develop' into story/vspc-190
pooja-thalur e23d325
[VSPC-190] review comments addressed
pooja-thalur 6ac37a5
[VSPC-190] review comments addressed
pooja-thalur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
vspace/src/main/java/edu/asu/diging/vspace/core/data/SpacesCustomOrderRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package edu.asu.diging.vspace.core.data; | ||
|
||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.vspace.core.model.impl.SpacesCustomOrder; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface SpacesCustomOrderRepository extends PagingAndSortingRepository<SpacesCustomOrder, String> { | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
vspace/src/main/java/edu/asu/diging/vspace/core/model/ExhibitionSpaceOrderMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package edu.asu.diging.vspace.core.model; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public enum ExhibitionSpaceOrderMode { | ||
jdamerow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ALPHABETICAL("alphabetical"), | ||
CREATION_DATE("creationDate"), | ||
CUSTOM("custom"); | ||
|
||
private final String value; | ||
|
||
private ExhibitionSpaceOrderMode(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public static List<String> getAllValues() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can probably just get rid of the values, and simply pass |
||
List<String> allValues = new ArrayList<>(); | ||
for(ExhibitionSpaceOrderMode order : ExhibitionSpaceOrderMode.values()) { | ||
allValues.add(order.getValue()); | ||
} | ||
return allValues; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
vspace/src/main/java/edu/asu/diging/vspace/core/model/ISpacesCustomOrder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package edu.asu.diging.vspace.core.model; | ||
|
||
import java.util.List; | ||
|
||
public interface ISpacesCustomOrder extends IVSpaceElement { | ||
|
||
public String getCustomOrderName(); | ||
|
||
public void setCustomOrderName(String customOrderName); | ||
|
||
public List<ISpace> getCustomOrderedSpaces(); | ||
|
||
public void setCustomOrderedSpaces(List<ISpace> customOrderedSpaces); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
vspace/src/main/java/edu/asu/diging/vspace/core/model/impl/SpacesCustomOrder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package edu.asu.diging.vspace.core.model.impl; | ||
|
||
|
||
import java.util.List; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.Inheritance; | ||
import javax.persistence.InheritanceType; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.JoinTable; | ||
import javax.persistence.ManyToMany; | ||
import javax.persistence.OrderColumn; | ||
|
||
import org.hibernate.annotations.GenericGenerator; | ||
import org.hibernate.annotations.Parameter; | ||
|
||
import edu.asu.diging.vspace.core.model.ISpace; | ||
import edu.asu.diging.vspace.core.model.ISpacesCustomOrder; | ||
|
||
@Entity | ||
@Inheritance(strategy = InheritanceType.JOINED) | ||
public class SpacesCustomOrder extends VSpaceElement implements ISpacesCustomOrder { | ||
|
||
@Id | ||
@GeneratedValue(generator = "customorder_id_generator") | ||
@GenericGenerator(name = "customorder_id_generator", | ||
parameters = @Parameter(name = "prefix", value = "SPC"), | ||
strategy = "edu.asu.diging.vspace.core.data.IdGenerator") | ||
private String id; | ||
|
||
@Column(nullable=false) | ||
private String customOrderName; | ||
|
||
@ManyToMany(targetEntity = Space.class) | ||
@JoinTable(name = "spaces_custom_orders", | ||
joinColumns = @JoinColumn(name = "SpacesCustomOrder_Id", referencedColumnName="id"), | ||
inverseJoinColumns = @JoinColumn(name = "Space_Id", referencedColumnName="id")) | ||
@OrderColumn | ||
private List<ISpace> customOrderedSpaces; | ||
|
||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getCustomOrderName() { | ||
return customOrderName; | ||
} | ||
|
||
public void setCustomOrderName(String customOrderName) { | ||
this.customOrderName = customOrderName; | ||
} | ||
|
||
public List<ISpace> getCustomOrderedSpaces() { | ||
return customOrderedSpaces; | ||
} | ||
|
||
public void setCustomOrderedSpaces(List<ISpace> customOrderedSpaces) { | ||
this.customOrderedSpaces = customOrderedSpaces; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
vspace/src/main/java/edu/asu/diging/vspace/core/services/IExhibitionSpaceOrderUtility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package edu.asu.diging.vspace.core.services; | ||
|
||
import java.util.List; | ||
|
||
import edu.asu.diging.vspace.core.model.ExhibitionSpaceOrderMode; | ||
import edu.asu.diging.vspace.core.model.ISpace; | ||
|
||
public interface IExhibitionSpaceOrderUtility { | ||
|
||
List<ISpace> sortSpaces(List<ISpace> publishedSpaces, ExhibitionSpaceOrderMode mode); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
vspace/src/main/java/edu/asu/diging/vspace/core/services/ISpacesCustomOrderManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package edu.asu.diging.vspace.core.services; | ||
|
||
import java.util.List; | ||
|
||
import edu.asu.diging.vspace.core.model.ISpace; | ||
import edu.asu.diging.vspace.core.model.ISpacesCustomOrder; | ||
import edu.asu.diging.vspace.core.model.impl.SpacesCustomOrder; | ||
|
||
public interface ISpacesCustomOrderManager { | ||
|
||
Iterable<SpacesCustomOrder> findAll(); | ||
|
||
void addSpaceToCustomOrders(ISpace space); | ||
|
||
void save(Iterable<SpacesCustomOrder> spacesCustomOrder); | ||
|
||
ISpacesCustomOrder get(String customSpaceOrderId); | ||
|
||
void updateNameAndDescription(String spacesCustomOrderId, String title, String description); | ||
|
||
void updateSpaces(String spacesCustomOrderId, List<String> spaceOrders); | ||
|
||
ISpacesCustomOrder create(List<String> spaceOrders, String name, String description); | ||
|
||
void setExhibitionSpacesCustomOrder(String customOrderId); | ||
|
||
void delete(String id); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since
sortPublishedSpacesByGivenOrder
returns a list, there is really no need to add all spaces topublishedSpaces
first, is there? Can't this be replaced with:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publishedSpaces has spaces with spaceStatus null and PUBLISHED, did not change it as I thought both the type of spaces are needed. Should I change the existing logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, GitHub hid the the other line above before, so I missed it. The way it was was correct