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.
6.9 kB · 163 lines
at lambda-parse
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164- title(@run)- timing = params[:timing] || @run.default_timing
- content_for(:header) do - if @run.game.present? && @run.category.present? ul.breadcrumb li = link_to @run.game, game_path(@run.game) li = link_to @run.category, game_category_path(@run.game, @run.category) li = link_to @run.id36, run_path(@run) li Edit = render partial: 'runs/title', locals: {run: @run, timing: timing}
= render partial: 'runs/full_timeline', locals: {run: @run, timing: timing}
article .row .col-md-6 .panel.panel-default .panel-heading Edit Game/Category .panel-body = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| .col-md-6 = f.collection_select( \ :game, \ Game.where.not(shortname: nil).order(:name), \ :shortname, \ :name, \ { \ selected: @run.game.try(:shortname), \ include_blank: true \ }, \ onchange: 'update_category_selector(this.value)', \ class: 'form-control' \ ) .col-md-4 = f.collection_select( \ :category, \ @run.game.present? ? @run.game.categories.group('categories.id').joins(:runs).order('count(runs.id) desc') : [], \ :id, \ :name, \ { \ selected: @run.category.try(:id) \ }, \ class: 'form-control' \ ) .col-md-2 = f.submit 'Save', id: 'game_category_submit', class: 'btn btn-success'
.col-md-6 .panel.panel-default .panel-heading Edit Video Proof .panel-body = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| .input-group = f.text_field(:video_url, class: 'form-control', placeholder: 'URL for a Twitch or YouTube VOD') span.input-group-btn = f.submit 'Save', class: 'btn btn-success'
.col-md-6 .panel.panel-default .panel-heading Edit Speedrun.com Link .panel-body = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| .input-group = f.text_field(:srdc_url, class: 'form-control', placeholder: 'URL for your run on speedrun.com') .input-group-btn = f.submit 'Save', class: 'btn btn-success'
.col-md-6 .panel.panel-default .panel-heading Reparse .panel-body p This button forces Splits I/O to reparse your run's original file. This can sometimes resolve bugs. center a.btn.btn-default href=edit_run_path(@run, reparse: '1') Reparse
article .row .col-md-6 .panel.panel-default .panel-heading List/Unlist .panel-body p An unlisted run isn't shown in category listings, search results, etc. but can still be viewed with a direct link and is still owned by and credited to you. p A run will become unlisted automatically when you beat its time, but you can also manually change that status here. center - if @run.archived? = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| = f.hidden_field(:archived, value: false) .btn-group = f.submit 'List Run', class: 'btn btn-info' button.btn.btn-info.disabled Unlisted - else = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| = f.hidden_field(:archived, value: true) .btn-group button.btn.btn-info.disabled Listed = f.submit 'Unlist Run', class: 'btn btn-info'
- if @run.completed?(Run::REAL) && @run.completed?(Run::GAME) .col-md-6 .panel.panel-default .panel-heading Realtime / Gametime .panel-body p For runs with times logged in both realtime and gametime, viewers can always toggle which is displayed. However, you can set the default behavior for this run here. center - if @run.default_timing == 'game' = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| = f.hidden_field(:default_timing, value: 'real') .btn-group = f.submit 'Realtime', class: 'btn btn-info' button.btn.btn-info.disabled Gametime - else = form_for @run, as: @run.id36, remote: true, url: run_path(@run) do |f| = f.hidden_field(:default_timing, value: 'game') .btn-group button.btn.btn-info.disabled Realtime = f.submit 'Gametime', class: 'btn btn-info'
article#danger-zone.danger .panel.panel-danger .panel-heading Set My Run Free .panel-body .row .col-md-6 .panel.panel-default .panel-heading Delete .panel-body .row .col-md-12 | Existing permalinks will be permanently broken and your run, its information, and the original file will all be destroyed. The URL code #{run_url(@run).split('//')[1]} | will never be reclaimed. .row .col-md-12 center = button_to run_path(@run), method: :delete, data: {confirm: "Really delete your #{@run} run?"}, class: 'button btn btn-danger', style: 'margin: 1em;' div big Delete small = "#{@run} in " = format_milliseconds(@run.realtime_duration_ms) .col-md-6 .panel.panel-default .panel-heading Disown .panel-body .row .col-md-12 p The run will continue to exist and be accessible, but it will no longer be attributed to you. It will appear as anonymously uploaded. p If you disown a run, you will never be able to reclaim it, and consequently you will not be able to delete it at a later time. .row .col-md-12 center = button_to run_path(@run), method: :patch, data: {confirm: "Really disown your #{@run} run?"}, params: {@run.id36 => {disown: true}}, class: 'button btn btn-danger', style: 'margin: 1em;' div big Disown small = "#{@run} in " = format_milliseconds(@run.realtime_duration_ms)