Apply some styling and add timeline

This commit is contained in:
Maximilian Grundke
2015-12-10 12:49:36 +01:00
parent b7b0bf826e
commit 79e7f7b7e8
5 changed files with 31 additions and 3 deletions

View File

@ -47,7 +47,7 @@ $(function() {
ace.config.set(attribute, ACE_FILES_PATH);
});
var slider = $('#slider>input');
var slider = $('#submissions-slider>input');
var submissions = $('#data').data('submissions');
var files = $('#data').data('files');

View File

@ -0,0 +1,9 @@
#submissions-slider {
margin-top: 25px;
margin-bottom: 25px;
}
#current-file.editor {
height: 400px;
}

View File

@ -16,9 +16,9 @@ h1 = "#{@exercise} (external user #{@external_user})"
.files class=(@exercise.hide_file_tree ? 'hidden col-sm-3' : 'col-sm-3') data-index=index data-entries=FileTree.new(files).to_js_tree
- index += 1
div class=(@exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
#current-file.editor style="height: 400px"
#current-file.editor
#slider
#submissions-slider
input type='range' orient='horizontal' list='datapoints' min=0 max=submissions.length-1 value=0
datalist#datapoints
- index=0
@ -28,5 +28,18 @@ h1 = "#{@exercise} (external user #{@external_user})"
- index += 1
#timeline
.table-responsive
table.table
thead
tr
- ['.time', '.cause', '.score'].each do |title|
th.header = t(title)
tbody
- submissions.each do |submission|
tr data-id=submission.id
td = submission.created_at.strftime("%F %T")
td = submission.cause
td = submission.score
- else
p = t('.no_data_available')

View File

@ -256,6 +256,9 @@ de:
external_users:
statistics:
no_data_available: Keine Daten verfügbar.
time: Zeit
cause: Grund
score: Punktzahl
files:
roles:
main_file: Hauptdatei

View File

@ -256,6 +256,9 @@ en:
external_users:
statistics:
no_data_available: No data available.
time: Time
cause: Cause
score: Score
files:
roles:
main_file: Main File