Browse Source

Remove DokuWiki wikitext feature

tags/last-sinatra-version
Adrian Short 8 years ago
parent
commit
81fded444a
2 changed files with 1 additions and 23 deletions
  1. +1
    -19
      app.rb
  2. +0
    -4
      views/resultsdistrict.haml

+ 1
- 19
app.rb View File

@@ -290,25 +290,7 @@ get '/bodies/:body/elections/:date/:districts_name/:district' do
ORDER BY total_votes DESC
", @district.id, @election.id)

if params[:wiki] == 'dokuwiki'
o = "^ #{@district.name} #{@district.body.district_name} results, #{@body.name} election #{short_date(@election.d)} ^^^^^^\n"
o += "^ Position ^ Candidate ^ Party ^ Votes ^ % Share ^ ^\n"
count = 0
@candidacies.each do |c|
count += 1
o += "| %2d | [[%-30s]] | [[%-40s]] | %6s | %3s | %-7s |\n" %
[ count,
c.candidate.short_name,
party_name(c.labcoop, c.party.name),
commify(c.votes),
format_percent(c.votes.to_f / @share_denominator * 100),
c.seats == 1 ? 'Elected' : ''
]
end
o
else
haml :resultsdistrict
end
haml :resultsdistrict
end

get '/bodies/:body/:districts_name/:district' do


+ 0
- 4
views/resultsdistrict.haml View File

@@ -88,10 +88,6 @@
.warning
= @share_message

%p.noprint
%a{ :href => "?wiki=dokuwiki" }
DokuWiki

- if @total_seats > 1
%h2 Votes by party



Loading…
Cancel
Save