Order nav on run and order pages

This commit is contained in:
Ben Ramey
2014-06-17 21:59:56 -05:00
parent c8b9a3442b
commit 0bddd8f69d
8 changed files with 43 additions and 17 deletions

View File

@@ -5,6 +5,7 @@ lunchControllers.controller 'RunCtrl', ['$scope', 'socket', '$routeParams', ($sc
$scope.progress = 0
$scope.numOrders = 0
$scope.progressClass = 'progress-bar-danger'
$scope.showMenuUrl = false
socket.get '/run/' + $routeParams['id'],
(response) ->
@@ -14,6 +15,7 @@ lunchControllers.controller 'RunCtrl', ['$scope', 'socket', '$routeParams', ($sc
$scope.show = true
$scope.run = response
$scope.showMenuUrl = response.menuUrl
socket.get '/invitee', run_id: response.id, (inviteeResponse) ->
$scope.invitees = inviteeResponse

View File

@@ -59,6 +59,15 @@ body {
margin-right: 30px;
font-size: 1.2em;
}
a {
color: white;
text-decoration: none;
&:hover {
color: lightgrey;
text-decoration:none;
}
}
}
h2 {

View File

@@ -28,4 +28,8 @@
padding-top: 9px;
}
}
a.back-to-run {
display: none;
}
}

View File

@@ -4,3 +4,4 @@
background-color: transparent;
}
}

View File

@@ -0,0 +1,9 @@
.modal.fade#menuModal(tabindex=-1,role='dialog',aria-labelledby='menuModalLabel',aria-hidden='true')
.modal-dialog.modal-lg
.modal-content
.modal-header
|  
button.close(type='button',data-dismiss='modal',aria-hidden='true') ×
.modal-body
h4.hidden.modal-title#menuModalLabel Menu
iframe(ng-src='{{ menuUrl }}',width='100%',height='400px')

View File

@@ -0,0 +1,7 @@
div.btn-group.pull-right
a.btn.btn-default.back-to-run(href='/#/run/{{ run.id }}')
span.glyphicon.glyphicon-share-alt
|  Back to Run
a.btn.btn-default(href='{{ run.menuUrl }}',target="_blank",data-toggle='modal',data-target='#menuModal',ng-show='showMenuUrl')
span.glyphicon.glyphicon-list-alt
|  Show Menu

View File

@@ -2,16 +2,13 @@ extends ../layouts/interior-page
block pagetitle
span.glyphicon.glyphicon-list
span.text-muted Enter your order for:
|  {{ run.name }}
span.text-muted Enter your order for: 
a(href='/#/run/{{ run.id }}') {{ run.name }}
block interiorcontent
div(ng-show='show')
p Hi {{ invitee.name }}! You are all going to {{ run.restaurant }}.
span.pull-right(ng-show='showMenuUrl')
a.btn.btn-default(href='{{ run.menuUrl }}',target="_blank",data-toggle='modal',data-target='#menuModal')
span.glyphicon.glyphicon-list-alt
|  Show Menu
p.pull-left Hi {{ invitee.name }}! You are all going to {{ run.restaurant }}.
include ../includes/order-nav
.row
.col-xs-12.col-sm-7
@@ -33,12 +30,4 @@ block interiorcontent
| : {{ i.order }}
block modals
.modal.fade#menuModal(tabindex=-1,role='dialog',aria-labelledby='menuModalLabel',aria-hidden='true')
.modal-dialog.modal-lg
.modal-content
.modal-header
|  
button.close(type='button',data-dismiss='modal',aria-hidden='true') ×
.modal-body
h4.hidden.modal-title#menuModalLabel Menu
iframe(ng-src='{{ menuUrl }}',width='100%',height='400px')
include ../includes/menu-modal

View File

@@ -7,7 +7,9 @@ block pagetitle
block interiorcontent
.run-details(ng-show="show")
p Wait here to see real-time updates of your invitees' orders.
.clearfix
p.pull-left Wait here to see real-time updates of your invitees' orders.
include ../includes/order-nav
.progress
div(class='progress-bar {{ progressClass }}',role='progressbar',aria-valuenow="{{ progress }}",aria-minvalue='0',aria-maxvalue='100',style='width:{{ progress }}%',ng-show='progress')
@@ -21,3 +23,6 @@ block interiorcontent
.fill.col-sm-2
a.btn.btn-default.btn-sm.btn-block(href='#/order/{{ i.id }}')
span.glyphicon.glyphicon-pencil
block modals
include ../includes/menu-modal