mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Merge pull request #3321 from taptapdan/fix-issue-2732
Looks good. Thanks!
This commit is contained in:
commit
a28b53eb5c
3 changed files with 46 additions and 0 deletions
|
@ -18,9 +18,20 @@
|
|||
.name-row
|
||||
@extend .body-row
|
||||
max-width: 300px
|
||||
.description-row
|
||||
@extend .body-row
|
||||
max-width: 520px
|
||||
.small-name-row
|
||||
@extend .body-row
|
||||
max-width: 200px
|
||||
.watch-row
|
||||
@extend .body-row
|
||||
max-width: 80px
|
||||
text-align: center
|
||||
&.watching
|
||||
opacity: 1.0
|
||||
&.not-watching
|
||||
opacity: 0.5
|
||||
|
||||
tr.mine
|
||||
background-color: #f8ecaa
|
||||
|
|
|
@ -1 +1,35 @@
|
|||
extends /templates/common/table
|
||||
|
||||
block tableResultsHeader
|
||||
tr
|
||||
th(colspan=4)
|
||||
span(data-i18n="general.results")
|
||||
| Results
|
||||
span
|
||||
|: #{documents.length}
|
||||
|
||||
block tableHeader
|
||||
tr
|
||||
th(data-i18n="general.name") Name
|
||||
th(data-i18n="general.description") Description
|
||||
th(data-i18n="general.version") Version
|
||||
th(data-i18n="common.watch") Watch
|
||||
|
||||
block tableBody
|
||||
for document in documents
|
||||
- var data = document.attributes;
|
||||
tr(class=document.get('creator') == me.id ? 'mine' : '')
|
||||
td(title=data.name).name-row
|
||||
a(href="/editor/#{page}/#{data.slug || data._id}")
|
||||
| #{data.name}
|
||||
td(title=data.description).description-row
|
||||
| #{data.description}
|
||||
td #{data.version.major}.#{data.version.minor}
|
||||
if document.watching()
|
||||
td.watch-row.watching
|
||||
span(aria-hidden="true").glyphicon.glyphicon-eye-open
|
||||
span(data-i18n="common.watch").sr-only Watch
|
||||
else
|
||||
td.watch-row.not-watching
|
||||
span(aria-hidden="true").glyphicon.glyphicon-eye-close
|
||||
span(data-i18n="common.unwatch").sr-only Unwatch
|
|
@ -6,6 +6,7 @@ module.exports = class LevelSearchView extends SearchView
|
|||
model: require 'models/Level'
|
||||
modelURL: '/db/level'
|
||||
tableTemplate: require 'templates/editor/level/table'
|
||||
projection: ['slug', 'name', 'description', 'version', 'watchers', 'creator']
|
||||
page: 'level'
|
||||
|
||||
getRenderData: ->
|
||||
|
|
Loading…
Reference in a new issue