| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
#4257 #4258
|
|
|
|
regarding the functional scope of the current organozation
|
|
|
|
af83/table-builder--allow-column-links-to-be-customised
Table builder allow column links to be customised
|
|
|
|
Add the new `link_to` argument to the example to show how it's used.
|
|
The `TableBuilderHelper` now requires you to specify a `link_to`
attribute in a column you want to make a link out of instead of doing it
automagically as before.
Update the tests to do this and continue to output the right `<a>`s for
links.
|
|
This reverts commit 28db706443a912e8355e4c48488dc40c403e7f76.
Turns out we didn't need to be able to pass an arbitrary number of
arguments to the lambda after all. The URL helper objects necessary in
addition to the first argument to the lambda can be retrieved from the
view context directly instead of passing them into the block as
parameters (which would actually make things more difficult, because the
block is called in the `TableBuilderHelper`, thus outside the scope of
the view).
|
|
Rewrite table builder calls to work with the new
`TableBuilderHelper::Column#link_to` mechanism for defining the linked
column and what it points to. This takes the link out of the
`TableBuilderHelper`, and puts it into the hands of the view.
It gives us more flexibility with regards to what can be defined as a
link in our tables and what those links point to.
This will be used in a more meaningful way in the `imports#show` page to
list `NetexImport`s and provide links to both the referential associated
with a Netex import and the imported file status page from a table row.
|
|
This enables us to pass multiple objects into the lambda, so that we can
for example build a URL using a Rails helper using multiple objects.
Example:
column.link_to(referential, item)
lambda do |referential, item|
some_path(referential, item)
end
|
|
Instead of always linking to the `name` and `comment` attributes, allow
any column to link to any thing by calling the new
`TableBuilderHelper::Column#link_to` method.
Because `linkable?`-ness is now determined at the column level, we can
get rid of the `#column_is_linkable?` method here.
The code is still pretty much "en désordre" as a result of the
`overhead` code tornado, but we'll have to deal with that later. (Oh
goodness I hope we get to deal with it.)
|
|
Testing out the new `TableBuilderHelper::Column#link_to` method to
provide the link needed to go to the row object's #show page.
Seems to work in this context, which is promising!
|
|
This tells the markup assembler whether or not this column should be
wrapped in a link (`<a>`). It intends to serve the same purpose as
`TableBuilderHelper#column_is_linkable`, but at the column level. The
idea is to remove that method when these links only operate by column
and not by pre-defined values like before/now.
|
|
This parameter will be used as the `href` to link the column value
somewhere.
We give it a lambda because this makes it easier to call any method on
the row object.
This means the accessor needs to take the object as an argument, like in
the `#value` method, because we don't have a better way to handle that
(it can't be done at initialisation time because at that point we don't
have row objects, we have a collection).
|
|
Refs #4367
|
|
Refs #4237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The code in `#perform` now updates the `started_at` time field which
breaks the existing mocks. Update them to match the code. Yes, T-not-DD.
|
|
The new form is `#update` and the specs (broken as they are) mock
`#update`, so this call should do the same.
|
|
Don't skip these any more. Working to figure out how to make new specs
that work with the new code.
|
|
|
|
|
|
Refs #4364
|
|
|
|
|
|
|
|
Import model clean up code and add specs
|
|
|
|
|
|
When any one of a parent import's children have failed, the parent
import should get status 'failed'.
|
|
Getting rid of the other commented test that checks failure because that
combination is no longer relevant and the basic failure cases are
handled by the specs just above.
|
|
Since we're not verifying `ended_at`, we have no need for the `Timecop`
block.
|
|
|
|
|
|
The name doesn't really match what's happening, since no `child` is
passed in as an argument any more. This just always happens any time
there are one or more failing children.
Remove the mock expectation because the extra fields don't really relate
to what we're supposed to be testing here, namely `status`.
|
|
These tests fail and are now wrong. While we previously prevented
updating the import object in the old code, now the `#update` method
gets called no matter what.
|
|
The new `#child_change` doesn't do a whole lot, so the specs that used
to test it don't belong any more. Update them so they test
`#update_status` instead, where this logic now lives.
|