Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 12-as-a-user-i-want-a-consistent-theme-across-the-website
  • 13-as-a-moderator-i-want-to-be-able-to-amend-and-remove-existing-locations-spaces-features
  • 14-as-a-user-i-want-to-view-a-list-of-all-locations-available
  • 15-as-a-user-i-want-to-find-out-what-tramshed-is-so-that-i-can-access-their-working-spaces
  • 16-as-a-user-i-want-to-be-able-to-find-information-about-tramshed-on-a-webpage
  • 16-as-a-user-i-want-to-be-able-to-find-information-about-tramshed-on-a-webpage-2
  • 2-as-a-user-i-want-to-be-authorized-if-i-am-a-member
  • 22-hotfix-templating-directory
  • 23-as-a-user-i-want-to-view-information-of-all-locations-available
  • 24-hotfix-development-directory
  • 25-adding-a-basic-locations-template-route
  • 26-link-booking-page-to-server-and-database
  • 26-link-booking-page-to-server-and-database-2
  • 26-link-booking-page-to-server-and-database-3
  • 26-link-booking-page-to-server-and-database-4
  • 28-fixing-bugs-and-issues
  • 3-as-a-moderator-i-want-to-be-able-to-add-new-locations-spaces-features
  • 7-as-a-user-i-want-to-see-all-of-the-working-spaces-available
  • 7-as-a-user-i-want-to-see-all-of-the-working-spaces-available-2
  • As-a-user-I-want-to-view-a-list-of-all-locations-available
  • As-a-user-I-want-to-view-information-of-all-locations-available
  • development
  • main
  • page-for-all-workingSpaces
24 results

Target

Select target project
  • c22064609/tramshed-tech-client-project-team-15
1 result
Select Git revision
  • 12-as-a-user-i-want-a-consistent-theme-across-the-website
  • 13-as-a-moderator-i-want-to-be-able-to-amend-and-remove-existing-locations-spaces-features
  • 14-as-a-user-i-want-to-view-a-list-of-all-locations-available
  • 15-as-a-user-i-want-to-find-out-what-tramshed-is-so-that-i-can-access-their-working-spaces
  • 16-as-a-user-i-want-to-be-able-to-find-information-about-tramshed-on-a-webpage
  • 16-as-a-user-i-want-to-be-able-to-find-information-about-tramshed-on-a-webpage-2
  • 2-as-a-user-i-want-to-be-authorized-if-i-am-a-member
  • 22-hotfix-templating-directory
  • 23-as-a-user-i-want-to-view-information-of-all-locations-available
  • 24-hotfix-development-directory
  • 25-adding-a-basic-locations-template-route
  • 26-link-booking-page-to-server-and-database
  • 26-link-booking-page-to-server-and-database-2
  • 26-link-booking-page-to-server-and-database-3
  • 26-link-booking-page-to-server-and-database-4
  • 28-fixing-bugs-and-issues
  • 3-as-a-moderator-i-want-to-be-able-to-add-new-locations-spaces-features
  • 7-as-a-user-i-want-to-see-all-of-the-working-spaces-available
  • 7-as-a-user-i-want-to-see-all-of-the-working-spaces-available-2
  • As-a-user-I-want-to-view-a-list-of-all-locations-available
  • As-a-user-I-want-to-view-information-of-all-locations-available
  • development
  • main
  • page-for-all-workingSpaces
24 results
Show changes

Commits on Source 8

......@@ -10,29 +10,32 @@ ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
@app.route("/", methods=['GET'])
def returnIndex():
if (request.method == 'GET'):
return render_template("test.html")
@app.route("/Manage_Coworking_Spaces", methods=['GET'])
def returnManageCoworkingSpaces():
if (request.method == 'GET'):
return render_template("Manage_Coworking_Spaces.html")
@app.route("/SearchRecord", methods=['POST'])
@app.route("/SearchRecord", methods=['POST', 'GET'])
def searchRecord():
if request.method =='POST':
try:
recordName = request.form.get('recordName', default="Error")
conn = sqlite3.connect(DATABASE)
cur = conn.cursor()
cur.execute("SELECT * FROM coworking_spaces WHERE Name=?;", [recordName])
recordData = cur.fetchall()
except:
print(f"Error: {recordData}")
conn.close()
finally:
conn.close()
print(f"{str(recordData)} Record found.")
return str(recordData)
print(f"{recordData} Record found.")
return (recordData)
# Adds a record to the CSV file.
@app.route("/AddRecord", methods=['POST'])
......
......@@ -19,6 +19,11 @@ overflow, float, display
body {
margin: 0;
padding: 0;
/* Below styling used for footer position. */
display: flex;
min-height: 100vh;
flex-direction: column;
}
ul, li {
......@@ -48,6 +53,7 @@ a {
header #pageHeader
div #headerDiv
a #headerText #headerImg
nav #headerNav .navBar
ul .Right, ul .Left
li a
......@@ -71,11 +77,11 @@ header #pageHeader
#headerText {
width: 100%;
margin-left: -220px;
margin-left: -240px;
}
#headerImg {
width: 180px;
width: 200px;
height: 65px;
margin-top: -10px;
margin-right: 20px;
......@@ -93,11 +99,6 @@ header #pageHeader
padding: 7.5px 10px;
}
#headerNav img {
width: 55px;
height: 20px;
}
/* [#2] Page navigation styling. Used in [#1] and [#4]. */
.navBar {
......@@ -130,7 +131,10 @@ main #pageMain
*/
#pageMain {}
#pageMain {
/* Below styling used for footer position. */
flex: 1;
}
#recordForm {
margin-left: 5px;
......
......@@ -52,6 +52,17 @@ function searchRecord(e) {
xhttp.onreadystatechange = function() {
if (xhttp.readyState === 4 && xhttp.status === 200) {
console.log(xhttp.responseText);
serverResponse = JSON.parse(xhttp.responseText);
document.getElementById("recordName").value = serverResponse[0][0];
document.getElementById("recordAddress").value = serverResponse[0][1];
document.getElementById("recordMainPhotos").value = serverResponse[0][2];
document.getElementById("recordAdditionalPhotos").value = serverResponse[0][3];
document.getElementById("recordDescription").value = serverResponse[0][4];
document.getElementById("recordWebsite").value = serverResponse[0][5];
document.getElementById("recordEmail").value = serverResponse[0][6];
document.getElementById("recordPhoneNumber").value = serverResponse[0][7];
document.getElementById("recordOpeningHours").value = serverResponse[0][8];
document.getElementById("recordCheckinInstructions").value = serverResponse[0][9];
document.getElementById("DEBUGserverMessage").innerHTML = xhttp.responseText;
} else {
console.error(`Status Text: ${xhttp.statusText}.`);
......@@ -61,7 +72,6 @@ function searchRecord(e) {
xhttp.send(params);
}
// Adds a record to the database.
function addRecord(e) {
// Removes the standard form processing.
......
......@@ -2,55 +2,31 @@
{%block headblock%}
<title> Manage Coworking Spaces </title>
<link rel="stylesheet" href="/static/CSS/Manage_Coworking_Spaces.css">
{%endblock%}
{%block onLoadblock%}
pageLoad()
{%endblock%}
{%block headerblock%}
<div id="headerDiv">
<a href="Manage_Coworking_Spaces.html">
<img id="headerImg" class="headerImg"
src="/static/Media/Tramshed-Logo-Main-Black.png"></img></a>
<a id="headerText" class="headerText"
<a id="headerText"
href="Manage_Coworking_Spaces">
Manage Coworking Spaces</a>
</div>
<nav id="headerNav" class="navBar">
<ul class="Left">
<li><a href="Manage_Coworking_Spaces">Home</a></li>
<li><a href="Locations">Locations</a></li>
</ul>
<ul class="Right">
<li><a href="Manage_Coworking_Spaces">Manage</a></li>
<li><a href="Manage_Coworking_Spaces">Login</a></li>
<li><div class="navHamburger">
<span></span>
<span></span>
<span></span>
</div></li>
</ul>
</nav>
{%endblock%}
{%block mainblock%}
<form id="recordForm" title="Record Form">
<label>Name: <input id="recordName" class="formTextInput"
name="record_name" type="text"></label><br>
name="record_name" type="text"></label>
<button id="searchButton" type="submit">Search</button><br>
<label>Address: <input id="recordAddress" class="formTextInput"
name="record_address" type="text"></label><br>
<label>Main Photograph: <input id="recordMainPhotos" class="formTextInput"
name="record_MP" type="text"></label><br>
name="record_MP" type="url"></label><br>
<label>Additional Photographs: <input id="recordAdditionalPhotos" class="formTextInput"
name="record_AP" type="text"></label><br>
name="record_AP" type="url"></label><br>
<label>Description: <input id="recordDescription" class="formTextInput"
name="record_description" type="text"></label><br>
<label>Website: <input id="recordWebsite" class="formTextInput"
name="record_website" type="text"></label><br>
name="record_website" type="url"></label><br>
<label>Email: <input id="recordEmail" class="formTextInput"
name="record_email" type="text"></label><br>
name="record_email" type="email"></label><br>
<label>Phone Number: <input id="recordPhoneNumber" class="formTextInput"
name="record_PN" type="text"></label><br>
<label>Opening Hours: <input id="recordOpeningHours" class="formTextInput"
......@@ -59,32 +35,14 @@
name="record_CI" type="text"></label>
<br><br>
<button id="searchButton" type="submit">Search</button>
<button id="addButton" type="submit">Add</button>
<button id="editButton" type="submit">Edit</button>
<button id="deleteButton" type="submit">Delete</button>
<button id="clearButton" type="reset">Clear</button>
</form>
<br>
<span id="DEBUGserverMessage"> </span>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
{%endblock%}
{%block footerblock%}
<nav id="footerNav" class="navBar">
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Left</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Center</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Right</a></li>
</ul>
</nav>
{%endblock%}
{%block jsblock%}
......
......@@ -4,12 +4,33 @@
<meta charSet="UTF-8">
{%block headblock%}
{%endblock%}
<link rel="stylesheet" href="/static/CSS/Manage_Coworking_Spaces.css">
</head>
<body onLoad="{%block onLoadblock%}{%endblock%}">
<body onLoad="pageLoad()">
<header id="pageHeader" class="pageHeader">
<div id="headerDiv">
<a href="Manage_Coworking_Spaces.html">
<img id="headerImg" class="headerImg"
src="/static/Media/Tramshed-Logo-Main-Black.png"></img></a>
{%block headerblock%}
{%endblock%}
</div>
<nav id="headerNav" class="navBar">
<ul class="Left">
<li><a href="/static/landingpage.html">Home</a></li>
<li><a href="/static/locations.html">Locations</a></li>
</ul>
<ul class="Right">
<li><a href="Manage_Coworking_Spaces">Manage</a></li>
<li><a href="/static/login.html">Login</a></li>
<li><div class="navHamburger">
<span></span>
<span></span>
<span></span>
</div></li>
</ul>
</nav>
</header>
<main id="pageMain">
......@@ -18,8 +39,17 @@
</main>
<footer id="pageFooter">
{%block footerblock%}
{%endblock%}
<nav id="footerNav" class="navBar">
<ul class="Center">
<li><a href="Manage_Coworking_Spaces">Left</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces">Center</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces">Right</a></li>
</ul>
</nav>
</footer>
<script src="{%block jsblock%}{%endblock%}"></script>
......