parameters: (request, tref, lang, version, page=1)
return_statement: return render_template(request,'activity.html', None, {
          'activity': history,
          "single": True,
          "ref": nref,
          "lang": lang,
          "version": version,
          "versionTitleInHebrew": getattr(version_record, "versionTitleInHebrew", version_record.versionTitle),
          'email': email,
          'filter_type': filter_type,
          'next_page': next_page,
          'he': request.interfaceLang == "hebrew", # to make templates less verbose
       })
docstring: View revision history for the text segment named by ref / lang / version.
docstring_summary: View revision history for the text segment named by ref / lang / version.
docstring_tokens: View revision history for the text segment named by ref / lang / version .
function: def segment_history(request, tref, lang, version, page=1):
      """
      View revision history for the text segment named by ref / lang / version.
      """
      try:
          oref = Ref(tref)
      except InputError:
          raise Http404
  
      page = int(page)
      nref = oref.normal()
  
      version = version.replace("_", " ")
      version_record = Version().load({"title":oref.index.title, "versionTitle":version, "language":lang})
      if not version_record:
          raise Http404("We do not have a version of {} called '{}'.  Please use the menu to find the text you are looking for.".format(oref.index.title, version))
      filter_type = request.GET.get("type", None)
      history = text_history(oref, version, lang, filter_type=filter_type, page=page)
  
      next_page = page + 1 if page else None
      next_page = "/activity/%s/%s/%s/%d" % (nref, lang, version, next_page) if next_page else None
      next_page = "%s?type=%s" % (next_page, filter_type) if next_page and filter_type else next_page
  
      email = request.user.email if request.user.is_authenticated else False
      return render_template(request,'activity.html', None, {
          'activity': history,
          "single": True,
          "ref": nref,
          "lang": lang,
          "version": version,
          "versionTitleInHebrew": getattr(version_record, "versionTitleInHebrew", version_record.versionTitle),
          'email': email,
          'filter_type': filter_type,
          'next_page': next_page,
          'he': request.interfaceLang == "hebrew", # to make templates less verbose
       })
function_tokens: def segment_history ( request , tref , lang , version , page = 1 ) : try : oref = Ref ( tref ) except InputError : raise Http404 page = int ( page ) nref = oref . normal ( ) version = version . replace ( "_" , " " ) version_record = Version ( ) . load ( { "title" : oref . index . title , "versionTitle" : version , "language" : lang } ) if not version_record : raise Http404 ( "We do not have a version of {} called '{}'.  Please use the menu to find the text you are looking for." . format ( oref . index . title , version ) ) filter_type = request . GET . get ( "type" , None ) history = text_history ( oref , version , lang , filter_type = filter_type , page = page ) next_page = page + 1 if page else None next_page = "/activity/%s/%s/%s/%d" % ( nref , lang , version , next_page ) if next_page else None next_page = "%s?type=%s" % ( next_page , filter_type ) if next_page and filter_type else next_page email = request . user . email if request . user . is_authenticated else False return render_template ( request , 'activity.html' , None , { 'activity' : history , "single" : True , "ref" : nref , "lang" : lang , "version" : version , "versionTitleInHebrew" : getattr ( version_record , "versionTitleInHebrew" , version_record . versionTitle ) , 'email' : email , 'filter_type' : filter_type , 'next_page' : next_page , 'he' : request . interfaceLang == "hebrew" , # to make templates less verbose } )