linkstory.ui.js 411 B

12345678910111213
  1. window.renderStoryCell = function(result, info)
  2. {
  3. const story = info.row.data;
  4. if(info.col.name == 'title' && result)
  5. {
  6. let html = '';
  7. let gradeLabel = (showGrade || story.grade >= 2) ? grades[story.grade] : '';
  8. if(gradeLabel) html += "<span class='label gray-pale rounded-xl'>" + gradeLabel + "</span>";
  9. if(html) result.unshift({html});
  10. }
  11. return result;
  12. };