Skip to content

Commit

Permalink
More styling changes, starting evaluation details.
Browse files Browse the repository at this point in the history
  • Loading branch information
Izaak Schroeder committed Feb 28, 2014
1 parent 7b84ffd commit b694dea
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 6 deletions.
15 changes: 11 additions & 4 deletions assets/styles/assignments.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
@import url("global.css");

.assignments {
background: #fff;
background: #f0f0f0;
padding: 20px 0;
}

.assignments .items {
Expand All @@ -13,18 +14,24 @@
}

.assignments li {
display: block;
display: flex;
flex-direction: column;
align-items: center;
width: 300px;
height: 300px;
background: #fff;
position: relative;
border: solid 1px #eee;
border-radius: 12px;
margin: 12px 0;
background: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.assignments li a {
position: absolute;
display: block;
top: 0; left: 0; right: 0; bottom: 0;
padding: 18px;
flex: initial;
}

.assignments li a img {
Expand Down
6 changes: 6 additions & 0 deletions assets/styles/evaluation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

@import url('global.css');

.evaluation {
background: #fff;
}
14 changes: 14 additions & 0 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,20 @@ app.get('/login/cas', require('./authentication/cas')(), session.authenticate(),
//app.get('/login/facebook', require('./authentication/facebook')(appId, appSecret, ['email']), session.authenticate());


app.param('evaluation', get('Evaluation'));

app.get('/evaluation/:evaluation', accepts('application/json', 'text/html', 'application/xhtml+xml'));

app.get(
'/evaluation/:evaluation',
accepts.on('text/html', 'application/xhtml+xml'),
function (req, res) {
return res.render('evaluation', {
evaluation: req.evaluation
})
}
);

app.post('/submission/:submission/evaluate', accepts('application/json', 'text/html', 'application/xhtml+xml'));


Expand Down
4 changes: 3 additions & 1 deletion views/assignment.jade
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,21 @@ mixin evaluation(context)
thead
tr
th Submission
th Evaluator
th Given
th Result
th
tbody
each evaluation in context.evaluations
tr
td #{evaluation.submission}
td #{evaluation.source}
td
time(datetime=evaluation.at) evaluation.at
td
span.result(data-score=evaluation.result) #{evaluation.result}
td
a.button(href="/evaluations/"+evaluation.id) Details
a.button(href="/evaluation/"+evaluation.id) Details
else
p You have no evaluations yet!

Expand Down
15 changes: 15 additions & 0 deletions views/evaluation.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends /layouts/default

block styles
link(rel="stylesheet", type="text/css", href="/styles/evaluation.css")

block content
.evaluation
.container
h1 Evaluation #{evaluation.id}

p Run:
a(href="/run/"+evaluation.run) #{evaluation.run}



2 changes: 1 addition & 1 deletion views/run.jade
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mixin evaluation()

block content
.container
h1 Job #{job.id}
h1 Run #{job.id}

each entry in job.logs
div #{entry.data.toString('utf8')}

0 comments on commit b694dea

Please sign in to comment.