Apply some styling and add timeline
This commit is contained in:
@ -47,7 +47,7 @@ $(function() {
|
|||||||
ace.config.set(attribute, ACE_FILES_PATH);
|
ace.config.set(attribute, ACE_FILES_PATH);
|
||||||
});
|
});
|
||||||
|
|
||||||
var slider = $('#slider>input');
|
var slider = $('#submissions-slider>input');
|
||||||
var submissions = $('#data').data('submissions');
|
var submissions = $('#data').data('submissions');
|
||||||
var files = $('#data').data('files');
|
var files = $('#data').data('files');
|
||||||
|
|
||||||
|
9
app/assets/stylesheets/statistics.css.scss
Normal file
9
app/assets/stylesheets/statistics.css.scss
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#submissions-slider {
|
||||||
|
margin-top: 25px;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#current-file.editor {
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
|
@ -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
|
.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
|
- index += 1
|
||||||
div class=(@exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
|
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
|
input type='range' orient='horizontal' list='datapoints' min=0 max=submissions.length-1 value=0
|
||||||
datalist#datapoints
|
datalist#datapoints
|
||||||
- index=0
|
- index=0
|
||||||
@ -28,5 +28,18 @@ h1 = "#{@exercise} (external user #{@external_user})"
|
|||||||
- index += 1
|
- index += 1
|
||||||
|
|
||||||
#timeline
|
#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
|
- else
|
||||||
p = t('.no_data_available')
|
p = t('.no_data_available')
|
||||||
|
@ -256,6 +256,9 @@ de:
|
|||||||
external_users:
|
external_users:
|
||||||
statistics:
|
statistics:
|
||||||
no_data_available: Keine Daten verfügbar.
|
no_data_available: Keine Daten verfügbar.
|
||||||
|
time: Zeit
|
||||||
|
cause: Grund
|
||||||
|
score: Punktzahl
|
||||||
files:
|
files:
|
||||||
roles:
|
roles:
|
||||||
main_file: Hauptdatei
|
main_file: Hauptdatei
|
||||||
|
@ -256,6 +256,9 @@ en:
|
|||||||
external_users:
|
external_users:
|
||||||
statistics:
|
statistics:
|
||||||
no_data_available: No data available.
|
no_data_available: No data available.
|
||||||
|
time: Time
|
||||||
|
cause: Cause
|
||||||
|
score: Score
|
||||||
files:
|
files:
|
||||||
roles:
|
roles:
|
||||||
main_file: Main File
|
main_file: Main File
|
||||||
|
Reference in New Issue
Block a user