<commit_before>extends layout

mixin navbutton(userstyle,style)
  if (userstyle==style) 
    li.active:  a(href="#{layout.htmlroot}/blog/#{blog.name}?style=#{userstyle}") #{userstyle}
  else
    li:  a(href="#{layout.htmlroot}/blog/#{blog.name}?style=#{userstyle}") #{userstyle}
  


block content
  .row 
    - unedited = blog._countUneditedMarkdown[left_lang];
    - notranslate = blog._countNoTranslateMarkdown[left_lang];
    - total = blog._countExpectedMarkdown[left_lang] 
    - ready = (total-unedited - notranslate)
    - if (total == 0) total = 1
  .row
    .col-md-1
      div.label.label-info.osmbc-lang(style="color:white")=left_lang
    .col-md-11
     div.progress(style="margin-bottom:2px")
      div.progress-bar.progress-bar-success(style="width:#{parseInt(100*ready/total)}%")=ready
      div.progress-bar.progress-bar-danger(style="width:#{parseInt(100*unedited/total)}%")=unedited
      div.progress-bar.progress-bar-info(style="width:#{parseInt(100*notranslate/total)}%")=notranslate
  if (right_lang!= "--")
    .row
      - unedited = blog._countUneditedMarkdown[right_lang];
      - notranslate = blog._countNoTranslateMarkdown[right_lang];
      - total = blog._countExpectedMarkdown[right_lang];
      - ready = (total-unedited - notranslate)
      - if (total == 0) total = 1
      .col-md-1
        div.label.label-info.osmbc-lang2(style="color:white")=right_lang
      .col-md-11
       div.progress(style="margin-bottom:10px")
        div.progress-bar.progress-bar-success(style="width:#{parseInt(100*ready/total)}%")=ready
        div.progress-bar.progress-bar-danger(style="width:#{parseInt(100*unedited/total)}%")=unedited
        div.progress-bar.progress-bar-info(style="width:#{parseInt(100*notranslate/total)}%")=notranslate


  .row
    .col-md-6
      - status = blog.status
      - if (blog["reviewComment"+left_lang]) status = "Review "+left_lang;
      - if (blog["close"+left_lang]) status = "Close "+left_lang;
      if blog.status == "help"
        h2
          | #{blog.name}
      else if left_lang == "DE"
        h2
          | Wochennotiz #{blog.name} (#{status})
      else
        h2
          | Weekly #{blog.name} (#{status})
      
    .col-md-6
      if !(blog["close"+left_lang])    
        - reviewCommentsLeft = blog["reviewComment"+left_lang];
        if (reviewCommentsLeft)
          .row
            .col-md-12
               form.form-horizontal(id="review" name="review", action="#{layout.htmlroot}/blog/#{blog.name}", method="get")
                .form-group
                  .col-sm-6
                    input(type="text",class="form-control",name ="reviewComment",id="reviewComment" placeholder="Please Type your Review here") 

                  .col-sm-6
                    button.btn.btn-large.btn-primary(id="reviewButton" type="submit",onclick="document.getElementById('reviewButton').disabled=true;document.getElementById('review').submit();") Review#{left_lang} 
                    if (blog["exported"+left_lang])
                      button.btn.btn-large.btn-primary(id="closebutton" type = "button" onclick ="document.getElementById('closebutton').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?closeLang&style=#{style}';") Close #{blog.name}(#{left_lang})
                    else
                      button.btn.btn-large.btn-primary(id="didexport" type = "button" onclick ="document.getElementById('didexport').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?reviewComment=markexported&style=#{style}';") Did Export (#{left_lang})

          if (blog["exported"+left_lang])
            .row
              .alert.bg-danger.text-center.bold
                | <strong>Blog is exported, please do the last Review in WordPress</strong>
      
        else
          if blog.status != "open"
            button.btn.btn-large.btn-primary(id="readyreview" onclick ="document.getElementById('readyreview').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?reviewComment=startreview&&style=#{style}';") Set #{blog.name}(#{left_lang}) ready for review

  .row
    .col-md-6
      - reviewCommentsLeft = blog["reviewComment"+left_lang];
        if (reviewCommentsLeft && reviewCommentsLeft.length>0)
          h3
            | Review #{left_lang}
          table.table.table-condensed.table-responsive
            tbody
            each comment in reviewCommentsLeft
              tr
                td=comment.user
                td=comment.text
                td=layout.moment(comment.timestamp).fromNow()
    .col-md-6
      - reviewCommentsRight = blog["reviewComment"+right_lang];
        if (reviewCommentsRight && reviewCommentsRight.length>0)
          h3
            | Review #{right_lang}
          table.table.table-condensed.table-responsive
            tbody
            each comment in reviewCommentsRight
              tr
                td=comment.user
                td=comment.text
                td=layout.moment(comment.timestamp).fromNow()
  
  .row
    .col-md-12
      ul.nav.nav-tabs
        +navbutton("OVERVIEW",style)
        +navbutton("TRANSLATION",style)
        +navbutton("FULL",style)
        +navbutton("FULLFINAL",style)
        li:  a(href="#{layout.htmlroot}/blog/#{blog.name}/previewNEdit") Review

        //
          - v = 0
          while layout.user["blogSetting"+v]
            if layout.user["blogSetting"+v]!="-"
              - style0 = layout.user["blogSetting"+v]+layout.user["blogLanguages"+v]
              +navbutton(style0,style)
            - v++ 
      
        li
          a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{left_lang}") 
            span.glyphicon.glyphicon-export
            | #{left_lang}
        if (right_lang != "--")
          li
            a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{right_lang}") 
              span.glyphicon.glyphicon-export
              | #{right_lang}
        li.dropdown
          a.dropdown-toggle(href='#', data-toggle='dropdown')
            span.glyphicon.glyphicon-export
          ul.dropdown-menu(role='menu')
            for lang in layout.languages
              li
                a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{lang}") Export #{lang}
        li.dropdown
          a.btn.btn-xs.dropdown-toggle.osmbc-lang(href='#', style="color:white", data-toggle='dropdown')
            |#{layout.language} 
            span.caret
          ul.dropdown-menu(role='menu')
            each l in layout.languages
              li
                a(href='#{layout.htmlroot}/language?lang=#{l}') #{l}
        li.dropdown.hidden-xs
          a.btn.btn-xs.dropdown-toggle.osmbc-lang2(href='#',style="color:white", data-toggle='dropdown')
            |#{(layout.language2)?layout.language2:"--"} 
            span.caret
          ul.dropdown-menu(role='menu')
            li 
              a(href='#{layout.htmlroot}/language?lang2=none') none
            each l in layout.languages
              li
                a(href='#{layout.htmlroot}/language?lang2=#{l}') #{l}

           

    
        
             
  .row
      :verbatim
        <br><br> 
        !{main_text}
  .row
    .col-md-9
    .col-md-1
      p
        a(href="#{layout.htmlroot}/blog/#{blog.name}/stat") [Statistic]

    .col-md-2
      p
        a(href="#{layout.htmlroot}/blog/edit/#{blog.name}") [Edit Blog Detail]




  .row.hidden-xs
    if changes
      div
        table.table.table-striped<commit_msg>Some styling for Review in Blog MOde.<commit_after>extends layout

mixin navbutton(userstyle,style)
  if (userstyle==style) 
    li.active:  a(href="#{layout.htmlroot}/blog/#{blog.name}?style=#{userstyle}") #{userstyle}
  else
    li:  a(href="#{layout.htmlroot}/blog/#{blog.name}?style=#{userstyle}") #{userstyle}
  


block content
  .row 
    - unedited = blog._countUneditedMarkdown[left_lang];
    - notranslate = blog._countNoTranslateMarkdown[left_lang];
    - total = blog._countExpectedMarkdown[left_lang] 
    - ready = (total-unedited - notranslate)
    - if (total == 0) total = 1
  .row
    .col-md-1
      div.label.label-info.osmbc-lang(style="color:white")=left_lang
    .col-md-11
     div.progress(style="margin-bottom:2px")
      div.progress-bar.progress-bar-success(style="width:#{parseInt(100*ready/total)}%")=ready
      div.progress-bar.progress-bar-danger(style="width:#{parseInt(100*unedited/total)}%")=unedited
      div.progress-bar.progress-bar-info(style="width:#{parseInt(100*notranslate/total)}%")=notranslate
  if (right_lang!= "--")
    .row
      - unedited = blog._countUneditedMarkdown[right_lang];
      - notranslate = blog._countNoTranslateMarkdown[right_lang];
      - total = blog._countExpectedMarkdown[right_lang];
      - ready = (total-unedited - notranslate)
      - if (total == 0) total = 1
      .col-md-1
        div.label.label-info.osmbc-lang2(style="color:white")=right_lang
      .col-md-11
       div.progress(style="margin-bottom:10px")
        div.progress-bar.progress-bar-success(style="width:#{parseInt(100*ready/total)}%")=ready
        div.progress-bar.progress-bar-danger(style="width:#{parseInt(100*unedited/total)}%")=unedited
        div.progress-bar.progress-bar-info(style="width:#{parseInt(100*notranslate/total)}%")=notranslate


  .row
    .col-md-6
      - status = blog.status
      - if (blog["reviewComment"+left_lang]) status = "Review "+left_lang;
      - if (blog["close"+left_lang]) status = "Close "+left_lang;
      if blog.status == "help"
        h2
          | #{blog.name}
      else if left_lang == "DE"
        h2
          | Wochennotiz #{blog.name} (#{status})
      else
        h2
          | Weekly #{blog.name} (#{status})
      
    .col-md-6
      if !(blog["close"+left_lang])    
        - reviewCommentsLeft = blog["reviewComment"+left_lang];
        if (reviewCommentsLeft)
          .row
            .col-md-12
              if (blog["exported"+left_lang])
                button.btn.btn-large.btn-warning(id="closebutton" type = "button" onclick ="document.getElementById('closebutton').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?closeLang&style=#{style}';") Close #{blog.name}(#{left_lang})
              else
                button.btn.btn-large.btn-warning(id="didexport" type = "button" onclick ="document.getElementById('didexport').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?reviewComment=markexported&style=#{style}';") Did Export (#{left_lang})

          if (blog["exported"+left_lang])
            .row
              .alert.bg-danger.text-center.bold
                | <strong>Blog is exported, please do the last Review in WordPress</strong>
      
        else
          if blog.status != "open"
            button.btn.btn-large.btn-primary(id="readyreview" onclick ="document.getElementById('readyreview').disabled=true;location.href='#{layout.htmlroot}/blog/#{blog.name}?reviewComment=startreview&&style=#{style}';") Set #{blog.name}(#{left_lang}) ready for review

  .row
    .col-md-6
      - reviewCommentsLeft = blog["reviewComment"+left_lang];
        if (reviewCommentsLeft && reviewCommentsLeft.length>0)
          h3
            | Review #{left_lang}
          table.table.table-condensed.table-responsive
            tbody
            each comment in reviewCommentsLeft
              tr
                td=comment.user
                td=comment.text
                td=layout.moment(comment.timestamp).fromNow()
          .form-group
            form.form-horizontal(id="review" name="review", action="#{layout.htmlroot}/blog/#{blog.name}", method="get")
              .col-md-10
                input(type="text",class="form-control",name ="reviewComment",id="reviewComment" placeholder="Please Type your Review here")
              .col-md-2
                button.btn.btn-large.btn-primary(id="reviewButton" type="submit",onclick="document.getElementById('reviewButton').disabled=true;document.getElementById('review').submit();") Review#{left_lang}

    .col-md-6
      - reviewCommentsRight = blog["reviewComment"+right_lang];
        if (reviewCommentsRight && reviewCommentsRight.length>0)
          h3
            | Review #{right_lang}
          table.table.table-condensed.table-responsive
            tbody
            each comment in reviewCommentsRight
              tr
                td=comment.user
                td=comment.text
                td=layout.moment(comment.timestamp).fromNow()
  
  .row
    .col-md-12
      ul.nav.nav-tabs
        +navbutton("OVERVIEW",style)
        +navbutton("TRANSLATION",style)
        +navbutton("FULL",style)
        +navbutton("FULLFINAL",style)
        li:  a(href="#{layout.htmlroot}/blog/#{blog.name}/previewNEdit") Review

        //
          - v = 0
          while layout.user["blogSetting"+v]
            if layout.user["blogSetting"+v]!="-"
              - style0 = layout.user["blogSetting"+v]+layout.user["blogLanguages"+v]
              +navbutton(style0,style)
            - v++ 
      
        li
          a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{left_lang}") 
            span.glyphicon.glyphicon-export
            | #{left_lang}
        if (right_lang != "--")
          li
            a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{right_lang}") 
              span.glyphicon.glyphicon-export
              | #{right_lang}
        li.dropdown
          a.dropdown-toggle(href='#', data-toggle='dropdown')
            span.glyphicon.glyphicon-export
          ul.dropdown-menu(role='menu')
            for lang in layout.languages
              li
                a(href="#{layout.htmlroot}/blog/#{blog.name}/preview?lang=#{lang}") Export #{lang}
        li.dropdown
          a.btn.btn-xs.dropdown-toggle.osmbc-lang(href='#', style="color:white", data-toggle='dropdown')
            |#{layout.language}
            span.caret
          ul.dropdown-menu(role='menu')
            each l in layout.languages
              li
                a(href='#{layout.htmlroot}/language?lang=#{l}') #{l}
        li.dropdown.hidden-xs
          a.btn.btn-xs.dropdown-toggle.osmbc-lang2(href='#',style="color:white", data-toggle='dropdown')
            |#{(layout.language2)?layout.language2:"--"}
            span.caret
          ul.dropdown-menu(role='menu')
            li
              a(href='#{layout.htmlroot}/language?lang2=none') none
            each l in layout.languages
              li
                a(href='#{layout.htmlroot}/language?lang2=#{l}') #{l}






  .row
      :verbatim
        <br><br> 
        !{main_text}
  .row
    .col-md-9
    .col-md-1
      p
        a(href="#{layout.htmlroot}/blog/#{blog.name}/stat") [Statistic]

    .col-md-2
      p
        a(href="#{layout.htmlroot}/blog/edit/#{blog.name}") [Edit Blog Detail]




  .row.hidden-xs
    if changes
      div
        table.table.table-striped
{'fraction_non_alphanumeric': 0.15546585940127816, 'fraction_numerical': 0.008139926000672721, 'mean_word_length': 2.3466906798739307, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1597599', 'n_tokens_mistral': 4722, 'n_tokens_neox': 4531, 'n_words': 599}