Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
3.5 kB · 69 lines
at lambda-parse
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970- description ||= nil- cols ||= [:runner, :time, :name, :rival, :uploaded]- runs = order_runs(runs).page(params[:page])- if runs.empty? center i No runs matched!- else .panel.panel-default - if description.present? .panel-heading = description table.panel-body.table.table-striped.table-hover thead tr - if cols.include?(:owner_controls) th.align-right - if cols.include?(:runner) th.align-right = link_to "Runner", "?#{request.query_parameters.merge(by: :user_id, order: (params[:by] == 'user_id' && params[:order] == 'asc') ? :desc : :asc).to_param}" - if cols.include?(:time) th.align-right = link_to "Time", "?#{request.query_parameters.merge(by: :time, order: (params[:by] == 'time' && params[:order] == 'asc') ? :desc : :asc).to_param}" - if cols.include?(:name) th Game + Category - if cols.include?(:rival) th.align-right Rival - if cols.include?(:uploaded) th.align-right = link_to "Uploaded", "?#{request.query_parameters.merge(by: :created_at, order: (params[:by] == 'created_at' && params[:order] == 'desc') ? :asc : :desc).to_param}" tbody - runs.includes(:user).each do |run| tr id="run_#{run.id36}" - if cols.include?(:owner_controls) td.align-right .dropdown .dropdown-toggle.kill-run-button id="dropdown_#{run.id36}" data={toggle: :dropdown} x ul.dropdown-menu.red role=:menu aria={labelledby: "dropdown_#{run.id36}"} li role=:presentation = link_to 'Disown', '#', onclick: "window.disown_run('#{run.id36}');", class: 'dropdown-header' = link_to 'Delete', '#', onclick: "window.delete_run('#{run.id36}');", class: 'dropdown-header' - if cols.include?(:runner) td.align-right - if run.user && run.user.name = link_to run.user, user_path(run.user), class: 'user-link' - if run.user.silver_patron? .gold-split title='Patron' - else | - - if cols.include?(:time) td.align-right = format_milliseconds(run.realtime_duration_ms) - if cols.include?(:name) td = link_to run, run_path(run), class: 'run-link' - if cols.include?(:rival) td.align-right small - rival = run.user.rival_for(run.category) - if rival.present? && rival.runs?(run.category) - rival_run = rival.pb_for(run.category) = link_to compare_path(run, rival_run), class: 'run-link stealth-link' do = pretty_difference(run.duration_ms(Run::REAL), rival_run.duration_ms(Run::REAL)) | against = rival - if rival.silver_patron? .gold-split title='Patron' - elsif run.category.present? = link_to '+', new_rivalry_path(category: run.category) - if cols.include?(:uploaded) td.align-right.nowrap class=('short' if run.short?) title=run.created_at = "#{time_ago_in_words(run.created_at)} ago" .center = paginate(runs, theme: 'twitter-bootstrap-3')