Move documents partials to components

This way it'll be easier to change them.

Note that there were two `.document-link` elements which aren't part of
a `.documents` element. We're renaming the HTML class of the link in
investments because it didn't contain links to download documents and
are slightly duplicating the CSS in the poll answer documents in order
to keep the `word-wrap` property.
This commit is contained in:
Javi Martín
2023-10-13 11:58:14 +02:00
parent e0c5be10aa
commit a2e4b056ee
13 changed files with 79 additions and 52 deletions

View File

@@ -0,0 +1,8 @@
class Documents::DocumentComponent < ApplicationComponent
attr_reader :document
delegate :can?, to: :helpers
def initialize(document)
@document = document
end
end