2016-08-16 12:24:34 -04:00
|
|
|
I18NEditModelView = require './I18NEditModelView'
|
|
|
|
Course = require 'models/Course'
|
|
|
|
deltasLib = require 'core/deltas'
|
|
|
|
Patch = require 'models/Patch'
|
2016-08-23 17:36:45 -04:00
|
|
|
Patches = require 'collections/Patches'
|
|
|
|
PatchModal = require 'views/editor/PatchModal'
|
|
|
|
|
|
|
|
# TODO: Apply these changes to all i18n views if it proves to be more reliable
|
2016-08-16 12:24:34 -04:00
|
|
|
|
|
|
|
module.exports = class I18NEditCourseView extends I18NEditModelView
|
|
|
|
id: "i18n-edit-course-view"
|
|
|
|
modelClass: Course
|
2016-08-23 17:36:45 -04:00
|
|
|
|
2016-08-16 12:24:34 -04:00
|
|
|
buildTranslationList: ->
|
|
|
|
lang = @selectedLanguage
|
|
|
|
|
|
|
|
# name, description
|
|
|
|
if i18n = @model.get('i18n')
|
|
|
|
if name = @model.get('name')
|
|
|
|
@wrapRow 'Course short name', ['name'], name, i18n[lang]?.name, []
|
|
|
|
if description = @model.get('description')
|
|
|
|
@wrapRow 'Course description', ['description'], description, i18n[lang]?.description, []
|
|
|
|
|