<commit_before>%section
  .page-header
    %h1 Welcome
  .row
    .span16
      - if @conference.rooms.count == 0
        .blank-slate
          %p
            Welcome, you seem to have just created this
            conference. A good first step would be to go
            to the <em>Conference Settings</em> tab above
            and add a room to this conference. This will
            be needed to schedule your program.
      - if @conference.events.count == 0 and @conference.call_for_papers.nil?
        .blank-slate
          %p
            This conference does not yet have any events.
            (Note that throughout the application, the
            generic term 'event' is used to refer to all
            sessions within your conference, no matter if
            they are talks, workshops, panels or something
            else entirely).
          %p
            Start adding events by clicking on the 
            <em>Events</em> tab above. Or start a call for 
            papers, to allow others to submit events for
            you to review.
  .row
    .span16
      %h2 
        Recent changes
        %small= link_to "more >>", recent_changes_path
      - if @versions.empty?
        .blank-slate
          %p
            Once you, or others start creating data for this
            conference, you will find who changed what here.
            This is especially interesting if you conduct a
            call for papers. In this case, this area allows
            you to quickly see if new submissions came in.
      - else
        = render "recent_changes/table"
        %p
  .row
    .span16
      %h2 Statistics
      - if @conference.events.count == 0
        .blank-slate
          %p
            Once you created some events for this conference,
            or gathered submissions through a call for papers,
            you will find some statistics about them here.
      - else
        %h4 Events by state
        %p
          = link_to "All", "#", :id => "events_all_types"
          |
          = link_to "lectures only", "#", :id => "events_lectures_only"
          |
          = link_to "workshops only", "#", :id => "events_workshops_only"
          |
          = link_to "others only", "#", :id => "events_others_only"
        #event_state_graph(style="width:600px;height:300px;")
      - if @conference.languages.count > 1
        %h4 Events by language
        %p
          = link_to "All", "#", :id => "languages_all_events"
          |
          = link_to "Accepted only", "#", :id => "languages_accepted_events_only"
        #event_language_graph(style="width:400px;height:300px;")

:coffeescript
  update_languages_breakdown = (accepted_only = false) ->
    if accepted_only
      params = {"accepted_only": 1}
    else
      params = {}
    $.ajax(
      url: "#{language_breakdown_statistics_path}",
      type: "GET",
      dataType: "json",<commit_msg>count events by state and show as table<commit_after>%section
  .page-header
    %h1 Welcome
  .row
    .span16
      - if @conference.rooms.count == 0
        .blank-slate
          %p
            Welcome, you seem to have just created this
            conference. A good first step would be to go
            to the <em>Conference Settings</em> tab above
            and add a room to this conference. This will
            be needed to schedule your program.
      - if @conference.events.count == 0 and @conference.call_for_papers.nil?
        .blank-slate
          %p
            This conference does not yet have any events.
            (Note that throughout the application, the
            generic term 'event' is used to refer to all
            sessions within your conference, no matter if
            they are talks, workshops, panels or something
            else entirely).
          %p
            Start adding events by clicking on the 
            <em>Events</em> tab above. Or start a call for 
            papers, to allow others to submit events for
            you to review.
  .row
    .span16
      %h2 
        Recent changes
        %small= link_to "more >>", recent_changes_path
      - if @versions.empty?
        .blank-slate
          %p
            Once you, or others start creating data for this
            conference, you will find who changed what here.
            This is especially interesting if you conduct a
            call for papers. In this case, this area allows
            you to quickly see if new submissions came in.
      - else
        = render "recent_changes/table"
        %p
  .row
    .span16
      %h2 Statistics
      - if @conference.events.count == 0
        .blank-slate
          %p
            Once you created some events for this conference,
            or gathered submissions through a call for papers,
            you will find some statistics about them here.
      - else
        %h4 Events by state
        %p
          = link_to "All", "#", :id => "events_all_types"
          |
          = link_to "lectures only", "#", :id => "events_lectures_only"
          |
          = link_to "workshops only", "#", :id => "events_workshops_only"
          |
          = link_to "others only", "#", :id => "events_others_only"
        #event_state_graph(style="width:600px;height:300px;")
        %table.zebra-stripe
          %thead
            %tr
              %th new
              %th review
              %th withdrawn
              %th unconfirmed
              %th confirmed
              %th canceled
              %th rejected
              %th total
          %tbody
            %tr
              %td= @conference.events.where(:state => :new).count
              %td= @conference.events.where(:state => :review).count
              %td= @conference.events.where(:state => :withdrawn).count
              %td= @conference.events.where(:state => :unconfirmed).count
              %td= @conference.events.where(:state => :confirmed).count
              %td= @conference.events.where(:state => :canceled).count
              %td= @conference.events.where(:state => :rejected).count
              %td= @conference.events.count
      - if @conference.languages.count > 1
        %h4 Events by language
        %p
          = link_to "All", "#", :id => "languages_all_events"
          |
          = link_to "Accepted only", "#", :id => "languages_accepted_events_only"
        #event_language_graph(style="width:400px;height:300px;")

:coffeescript
  update_languages_breakdown = (accepted_only = false) ->
    if accepted_only
      params = {"accepted_only": 1}
    else
      params = {}
    $.ajax(
      url: "#{language_breakdown_statistics_path}",
      type: "GET",
      dataType: "json",
{'fraction_non_alphanumeric': 0.09033613445378151, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 1.7518579686209743, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 38, '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': '4913578', 'n_tokens_mistral': 1854, 'n_tokens_neox': 1808, 'n_words': 604}