-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update existing views and AppController.java
Updated existing views. Also, successfully tested and merged checkout book feature using myCalendar entity.
- Loading branch information
1 parent
bc9faca
commit 1115cd4
Showing
8 changed files
with
227 additions
and
11 deletions.
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
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
122 changes: 122 additions & 0 deletions
122
LibraryManagementSystem/src/main/webapp/WEB-INF/views/confirmedCheckoutScreen.jsp
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,122 @@ | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> | ||
<%@ page isELIgnored="false" %> | ||
<%@ taglib prefix="form" uri="https://www.springframework.org/tags/form"%> | ||
<%@ taglib prefix="c" uri="https://java.sun.com/jsp/jstl/core" %> | ||
<%@ taglib prefix="fmt" uri="https://java.sun.com/jsp/jstl/fmt" %> | ||
|
||
<html> | ||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
<title>Users page</title> | ||
<link href="<c:url value='/static/css/bootstrap.css' />" rel="stylesheet"></link> | ||
<link href="<c:url value='/static/css/app.css' />" rel="stylesheet"></link> | ||
</head> | ||
<body> | ||
<div class="col-md-12"> | ||
<div class="col-md-8"> | ||
<h3>Welcome <strong>${user}</strong></h3> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
<a href="<c:url value="/logout" />" class="btn btn-default" style="margin: 20px 0px 0px 300px;">Logout</a> | ||
</div> | ||
</div> | ||
<div class="panel panel-default"> | ||
<input type="hidden" id="useremail" value="${useremail }"> | ||
<div class="panel-heading"><span class="lead">Checkout Details</span></div> | ||
<!-- Default Panel Contents --> | ||
<form:form method="POST" modelAttribute="book" class="form-horizontal"> | ||
<form:input type="hidden" path="id" id="id"/> | ||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="publicationYear">Publication Year</label> | ||
<div class="col-md-7"> | ||
<form:input type="text" path="publicationYear" id="publicationYear" class="form-control input-sm" readonly="true"/> | ||
<div class="has-error"> | ||
<form:errors path="publicationYear" class="help-inline"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="author">Author</label> | ||
<div class="col-md-7"> | ||
<form:input type="text" path="author" id="author" class="form-control input-sm" readonly="true"/> | ||
<div class="has-error"> | ||
<form:errors path="author" class="help-inline"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="title">Title</label> | ||
<div class="col-md-7"> | ||
<form:input type="text" path="title" id="title" class="form-control input-sm" readonly="true"/> | ||
<div class="has-error"> | ||
<form:errors path="title" class="help-inline"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="callNumber">Call Number</label> | ||
<div class="col-md-7"> | ||
<form:input type="text" path="callNumber" id="callNumber" class="form-control input-sm" readonly="true"/> | ||
<div class="has-error"> | ||
<form:errors path="callNumber" class="help-inline"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="publisher">Publisher</label> | ||
<div class="col-md-7"> | ||
<form:input type="text" path="publisher" id="publisher" class="form-control input-sm" readonly="true"/> | ||
<div class="has-error"> | ||
<form:errors path="publisher" class="help-inline"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="dueDate">Due Date</label> | ||
<div class="col-md-7"> | ||
<fmt:parseDate value="${widget}" pattern="yyyy-MM-dd" | ||
var="parsedDate" type="date" /> | ||
<fmt:formatDate value="${parsedDate}" var="widget" | ||
type="date" pattern="mm/dd/yyyy" /> | ||
<input type="text" id="dueDate" value="${due }" class="form-control input-sm" readonly="true"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row" style="display: none;"> | ||
<div class="form-group col-md-12"> | ||
<label class="col-md-3 control-lable" for="userid">UserId</label> | ||
<div class="col-md-7"> | ||
<input type="text" path="userid" id="userid" class="form-control input-sm" readonly="true" value="${userid}"/> | ||
</div> | ||
</div> | ||
</div> | ||
</form:form> | ||
</div> | ||
<sec:authorize access="hasRole('USER')"> | ||
<div class="well"> | ||
<a href="<c:url value='/home' />" class="btn btn-primary" >Return Home</a> | ||
</div> | ||
</sec:authorize> | ||
</body> | ||
</html> |
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
89 changes: 89 additions & 0 deletions
89
LibraryManagementSystem/src/main/webapp/WEB-INF/views/searchResults.jsp
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,89 @@ | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> | ||
<%@ taglib prefix="c" uri="https://java.sun.com/jsp/jstl/core"%> | ||
<%@ page isELIgnored="false" %> | ||
<%-- | ||
<%@ taglib prefix="sec" uri="https://www.springframework.org/security/tags" %> | ||
--%> | ||
<html> | ||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
var val = $('#val1').val(); | ||
console.log(val); | ||
if (val == "failure") | ||
alert("Book Cannot be deleted. It is checked out by a patron."); | ||
else if (val == "exception") | ||
alert("Something went wrong. Please try again."); | ||
else if(val=="Success") | ||
alert("Book Deleted successfully.") | ||
}); | ||
</script> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
<title>Admin page</title> | ||
<link href="<c:url value='/static/css/bootstrap.css' />" rel="stylesheet"></link> | ||
<link href="<c:url value='/static/css/app.css' />" rel="stylesheet"></link> | ||
</head> | ||
|
||
<body> | ||
<div class="col-md-12"> | ||
<div class="col-md-8"> | ||
<h3>Welcome <strong>${user}</strong></h3> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
<a href="<c:url value="/logout" />" class="btn btn-default" style="margin: 20px 0px 0px 300px;">Logout</a> | ||
</div> | ||
</div> | ||
<div class="panel panel-default"> | ||
<div class="form-group row"> | ||
<div class="col-xs-6"> | ||
<input type="hidden" id="val1" value="${val1 }"> | ||
<input class="form-control" type="text" id="txtSearch" placeholder="Search Book Name" name="txtSearch"> | ||
<input type="button" class="btn btn-primary" value="Search" id="btnSearch" name="btnSearch" style="margin:10px 0px 0px 0px;"> | ||
</div> | ||
</div> | ||
<div class="panel-heading"><span class="lead">List of Books</span></div> | ||
<!-- Default Panel Contents --> | ||
<table class="table table-hover"> | ||
<thead> | ||
<tr> | ||
<th>Publication Year</th> | ||
<th>Location</th> | ||
<th>Availability</th> | ||
<th>Author</th> | ||
<th>Title</th> | ||
<th>Publisher</th> | ||
<sec:authorize access="hasRole('ADMIN')"> | ||
<th width="100"></th> | ||
</sec:authorize> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<c:forEach items="${books}" var="book"> | ||
<tr> | ||
<td id="idField" style="display:none;">${book.id}</td> | ||
<td>${book.publicationYear}</td> | ||
<td>${book.libraryLocation}</td> | ||
<td>${book.availability}</td> | ||
<td>${book.author}</td> | ||
<td>${book.title}</td> | ||
<td>${book.publisher}</td> | ||
<td><a href="<c:url value='/edit-book-${book.id}'/>" class="btn btn-success custom-width">Edit</a></td> | ||
<td><a href="<c:url value='/delete-book-search-${book.id}?name=${book.title }'/>" class="btn btn-danger custom-width">Delete</a></td> | ||
</tr> | ||
</c:forEach> | ||
</tbody> | ||
</table> | ||
</div> | ||
<sec:authorize access="hasRole('USER')"> | ||
<div class="well"> | ||
<a href="<c:url value='/admin' />" class="btn btn-primary" >Return Back to Home</a> | ||
</div> | ||
</sec:authorize> | ||
</body> | ||
</html> |
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