Skip to content

Commit ba31ec1

Browse files
committed
Merge pull request #659 from LearningLocker/develop
v1.5.1
2 parents d0675a9 + b874d5e commit ba31ec1

File tree

9 files changed

+47
-27
lines changed

9 files changed

+47
-27
lines changed

app/views/partials/client/manage.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div>
1717
<div class="alert alert-success clearfix">
1818
<div class="col-sm-10">
19-
<b>{{ trans('lrs.endpoint.endpoint') }}:</b> <span class="break-words">{{ URL() }}/data/xAPI</span>
19+
<b>{{ trans('lrs.endpoint.endpoint') }}:</b> <span class="break-words">{{ URL() }}/data/xAPI/</span>
2020
</div>
2121
</div>
2222
<div>
@@ -54,4 +54,4 @@
5454
</div>
5555
</div>
5656

57-
@stop
57+
@stop

app/views/partials/site/backbone/templates.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<td>
1515
<%= created_at %>
1616
</td>
17-
<td>
17+
<td class="text-center">
1818
<a href="{{ URL() }}/lrs/<%= _id %>/edit" class="btn btn-xs btn-success btn-space" title="{{ Lang::get('site.edit') }}"><i class="icon-pencil"></i></a>
1919
</td>
20-
<td>
20+
<td class="text-center">
2121
<button class="btn btn-danger btn-xs delete" title="{{ Lang::get('site.delete') }}"><i class="icon-trash"></i></button>
2222
</td>
2323
</script>
@@ -30,8 +30,8 @@
3030
<th>Statement #</th>
3131
<th>User #</th>
3232
<th>Created</th>
33-
<th>Edit</th>
34-
<th></th>
33+
<th class="text-center">Edit</th>
34+
<th class="text-center">Delete</th>
3535
</tr>
3636
</thead>
3737
<tbody></tbody>
@@ -60,7 +60,7 @@
6060
<td class="col-sm-2">
6161
<%= email %>
6262
</td>
63-
<td class="col-sm-4">
63+
<td class="col-sm-3">
6464
<% if ( lrs_owned.length > 0 ){ %>
6565
<p>Lrs's owned:
6666
<% _.each(lrs_owned, function(lrs) { %>
@@ -86,7 +86,7 @@
8686
<td class="col-sm-2">
8787
<%= created_at %>
8888
</td>
89-
<td class="col-sm-1">
89+
<td class="col-sm-2 text-center">
9090
<button class="btn btn-danger btn-xs delete" title="{{ Lang::get('site.delete') }}"><i class="icon-trash"></i></button>
9191
</td>
9292
</script>
@@ -100,7 +100,7 @@
100100
<th>LRSs</th>
101101
<th>Role</th>
102102
<th>Joined</th>
103-
<th></th>
103+
<th class="text-center">Delete</th>
104104
</tr>
105105
</thead>
106106
<tbody></tbody>
@@ -125,7 +125,7 @@
125125
<td>
126126
<%= created_at %>
127127
</td>
128-
<td>
128+
<td class="text-center">
129129
<button class="btn btn-danger btn-xs delete" title="{{ Lang::get('site.delete') }}"><i class="icon-remove"></i></button>
130130
</td>
131131
</script>

public/assets/js/exports/exports/collectionTemplate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<th><%= trans('exporting.fields.name') %></th>
1111
<th><%= trans('exporting.fields.description') %></th>
1212
<th><%= trans('exporting.fields.created') %></th>
13-
<th><%= trans('exporting.actions.edit') %></th>
14-
<th><%= trans('exporting.actions.delete') %></th>
13+
<th class="text-center"><%= trans('exporting.actions.edit') %></th>
14+
<th class="text-center"><%= trans('exporting.actions.delete') %></th>
1515
</tr>
1616
</thead>
1717
<tbody id="exports">

public/assets/js/exports/exports/modelTemplate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<td>
88
<%= created_at %>
99
</td>
10-
<td>
10+
<td class="text-center">
1111
<a id="edit" class="btn btn-info btn-sm" href="#<%= _id %>">
1212
<i class="icon icon-pencil"></i>
1313
</a>
1414
</td>
15-
<td>
15+
<td class="text-center">
1616
<div id="delete" class="btn btn-danger btn-sm">
1717
<i class="icon icon-trash"></i>
1818
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<td>
22
<input id="typeahead-value" value="<%= value %>" data-toggle="tooltip" data-placement="bottom" placeholder="<%= example %>"/>
33
</td>
4-
<td><a id="trash" class="btn btn-danger btn-sm"><i class="icon icon-minus"></i></a></td>
4+
<td class="text-center"><a id="trash" class="btn btn-danger btn-sm"><i class="icon icon-minus"></i></a></td>

public/assets/js/reports/reports/editLayout.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,27 @@ define([
114114
relations: {
115115
actors: typeaheadHelpers.view('actors', 'Actor', 'Start typing name e.g. Bob', typeaheadHelpers.displayActor),
116116
verbs: typeaheadHelpers.view('verbs', 'Verb', 'Start typing verb e.g. completed', function (item) {
117-
var id = item.id
117+
var id = item.id;
118+
var value = null;
119+
120+
// Return a human-readable value if the browser defines languages.
121+
if (navigator.languages instanceof Array) {
122+
value = item.display && (navigator.languages.map(function (lang) {
123+
return item.display[lang];
124+
}).filter(function (value) {
125+
return value != null;
126+
})[0] || (item.display[Object.keys(item.display)[0]]));
127+
}
128+
129+
// Display human-readable value if it exists
130+
if (value != null) {
131+
return value + ' (' + id + ')';
132+
}
133+
134+
// Otherwise display just the identifier.
135+
else {
136+
return id
137+
}
118138
return item.display['en-GB'] + ' (' + id + ')';
119139
}),
120140
activities: typeaheadHelpers.view('activities', 'Activity URL', 'www.example.com/quiz/1'),
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<td><%= name %></td>
22
<td><%= description %></td>
33
<td><%= created_at %></td>
4-
<td><a id="edit" href="#<%= _id %>/edit" class="btn btn-info btn-sm"><i class="icon icon-pencil"></i></a></td>
5-
<td><a id="graph" href="#<%= _id %>/graph" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="bottom" title="View a graph of statements that match this report"><i class="icon icon-signal"></i></a></td>
6-
<td><a id="statements" href="reporting/<%= _id %>/statements" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="bottom" title="View a list of statements that match this report"><i class="icon icon-eye-open"></i></a></td>
7-
<td><a id="trash" class="btn btn-danger btn-sm"><i class="icon icon-trash"></i></a></td>
4+
<td class="text-center"><a id="edit" href="#<%= _id %>/edit" class="btn btn-info btn-sm"><i class="icon icon-pencil"></i></a></td>
5+
<td class="text-center"><a id="graph" href="#<%= _id %>/graph" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="bottom" title="View a graph of statements that match this report"><i class="icon icon-signal"></i></a></td>
6+
<td class="text-center"><a id="statements" href="reporting/<%= _id %>/statements" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="bottom" title="View a list of statements that match this report"><i class="icon icon-eye-open"></i></a></td>
7+
<td class="text-center"><a id="trash" class="btn btn-danger btn-sm"><i class="icon icon-trash"></i></a></td>

public/assets/js/reports/reports/table.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<th><%= trans('site.name') %></th>
1010
<th><%= trans('site.description') %></th>
1111
<th><%= trans('reporting.created') %></th>
12-
<th><%= trans('site.edit') %></th>
13-
<th><%= trans('reporting.graph') %></th>
14-
<th><%= trans('statements.statements') %></th>
15-
<th><%= trans('site.delete') %></th>
12+
<th class="text-center"><%= trans('site.edit') %></th>
13+
<th class="text-center"><%= trans('reporting.graph') %></th>
14+
<th class="text-center"><%= trans('statements.statements') %></th>
15+
<th class="text-center"><%= trans('site.delete') %></th>
1616
</tr>
1717
</thead>
1818
<tbody id="models"></tbody>

public/assets/js/reports/reports/typeaheadHelpers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ define([
1010

1111
// Return a human-readable value if the browser defines languages.
1212
if (navigator.languages instanceof Array) {
13-
value = navigator.languages.map(function (lang) {
14-
return item.definition && item.definition.name && item.definition.name[lang];
13+
value = item.definition && item.definition.name && (navigator.languages.map(function (lang) {
14+
return item.definition.name[lang];
1515
}).filter(function (value) {
1616
return value != null;
17-
})[0];
17+
})[0] || (item.definition.name[Object.keys(item.definition.name)[0]]));
1818
}
1919

2020
// Display human-readable value if it exists

0 commit comments

Comments
 (0)