parameters: (request)
return_statement: return render_template(request,'dashboard.html', None, {
          "states": states,
      })
docstring: Dashboard page -- table view of all content
docstring_summary: Dashboard page -- table view of all content
docstring_tokens: Dashboard page -- table view of all content
function: def dashboard(request):
      """
      Dashboard page -- table view of all content
      """
      states = VersionStateSet(
          {},
          proj={"title": 1, "flags": 1, "linksCount": 1, "content._en.percentAvailable": 1, "content._he.percentAvailable": 1}
      ).array()
      flat_toc = library.get_toc_tree().flatten()
  
      def toc_sort(a):
          try:
              return flat_toc.index(a["title"])
          except:
              return 9999
  
      states = sorted(states, key=toc_sort)
  
      return render_template(request,'dashboard.html', None, {
          "states": states,
      })
function_tokens: def dashboard ( request ) : states = VersionStateSet ( { } , proj = { "title" : 1 , "flags" : 1 , "linksCount" : 1 , "content._en.percentAvailable" : 1 , "content._he.percentAvailable" : 1 } ) . array ( ) flat_toc = library . get_toc_tree ( ) . flatten ( ) def toc_sort ( a ) : try : return flat_toc . index ( a [ "title" ] ) except : return 9999 states = sorted ( states , key = toc_sort ) return render_template ( request , 'dashboard.html' , None , { "states" : states , } )