<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/lib/link.rb, branch 5568-fix-vjs-editor</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Refs #5361 @1H; Make company optional in Lines form</title>
<updated>2017-12-21T20:58:56+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2017-12-21T14:47:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=be8afa7aa3fd1c8922a4e02e16cdfef698b3df26'/>
<id>be8afa7aa3fd1c8922a4e02e16cdfef698b3df26</id>
<content type='text'>
And handle the case when it is nil in the views
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And handle the case when it is nil in the views
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #5430 @2h; Deactivate lines instead of destroying them</title>
<updated>2017-12-21T20:19:27+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2017-12-20T11:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9a34cb48f49df574ae1e7c599713ed246e2938cf'/>
<id>9a34cb48f49df574ae1e7c599713ed246e2938cf</id>
<content type='text'>
- Add `activate` and `deactivate` actions in `LinesController`, as well
as corresponding routes
- Add `activate!` and `deactivate!` methods in `Chouette::Line`, as well
as `activated?`
- Add `activate?` and `deactivate?` permissions in `LinePolicy`
- Add corresponding `action_links`in the Decorator
- Create helper for these actions
- Add an optional `'extra_class` to the Links
- Update styles for ".delete-action" to handle the case where there are
several
- Add I18n keys accordingly
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add `activate` and `deactivate` actions in `LinesController`, as well
as corresponding routes
- Add `activate!` and `deactivate!` methods in `Chouette::Line`, as well
as `activated?`
- Add `activate?` and `deactivate?` permissions in `LinePolicy`
- Add corresponding `action_links`in the Decorator
- Create helper for these actions
- Add an optional `'extra_class` to the Links
- Update styles for ".delete-action" to handle the case where there are
several
- Add I18n keys accordingly
</pre>
</div>
</content>
</entry>
<entry>
<title>Link: Change :name &amp; :content into a single property :content</title>
<updated>2017-06-15T12:49:34+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-15T12:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=40b02ab0bdbf51ea4c9d3ebef26d880c789edf44'/>
<id>40b02ab0bdbf51ea4c9d3ebef26d880c789edf44</id>
<content type='text'>
The only difference between :name and :content was that :name contained
a string and :content contained HTML. But they're really the same thing.
Thus it makes much more sense to combine those into a single property
that means both, and handles content regardless of type.

Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only difference between :name and :content was that :name contained
a string and :content contained HTML. But they're really the same thing.
Thus it makes much more sense to combine those into a single property
that means both, and handles content regardless of type.

Refs #3479
</pre>
</div>
</content>
</entry>
<entry>
<title>TableBuilder: Make destroy link in gear menu render correctly</title>
<updated>2017-06-15T12:37:14+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-15T12:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=3b621ee93c5097c55bd4ce4c7bdecdaa18c6f9ab'/>
<id>3b621ee93c5097c55bd4ce4c7bdecdaa18c6f9ab</id>
<content type='text'>
Previously we weren't correctly outputting the proper HTML to get the
:delete link rendering correctly with the icon and text. It should show:

    [TRASH CAN ICON] Supprimer

but instead was showing the href.

To get this working, I added a `@content` attribute to `Link`. This
allows us to optionally specify non-text content to display in the link.

We then have delete-link-specific handling when rendering the gear
menu's HTML. In that particular case, the `&lt;li&gt;` needs to have a
'delete-action' class in order for the styling to work properly.

Created a new `destroy_link` helper method to allow us to reuse the
destroy link content in the header bar.

TODO: Collect Link#content and Link#name into the same property.
TODO: Rename `#destroy_link` to `#destroy_link_content`

Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we weren't correctly outputting the proper HTML to get the
:delete link rendering correctly with the icon and text. It should show:

    [TRASH CAN ICON] Supprimer

but instead was showing the href.

To get this working, I added a `@content` attribute to `Link`. This
allows us to optionally specify non-text content to display in the link.

We then have delete-link-specific handling when rendering the gear
menu's HTML. In that particular case, the `&lt;li&gt;` needs to have a
'delete-action' class in order for the styling to work properly.

Created a new `destroy_link` helper method to allow us to reuse the
destroy link content in the header bar.

TODO: Collect Link#content and Link#name into the same property.
TODO: Rename `#destroy_link` to `#destroy_link_content`

Refs #3479
</pre>
</div>
</content>
</entry>
<entry>
<title>TableBuilder;Link: Remove default `:get` for HTTP method</title>
<updated>2017-06-15T09:32:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-15T09:32:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=133bb6b8471df2ec1057d061dc170712a94a9425'/>
<id>133bb6b8471df2ec1057d061dc170712a94a9425</id>
<content type='text'>
Don't set links as `method: :get` by default. This shows up as:

    link_to _, _, method: :get

If we set the method to `nil` instead, we don't get a
`data-method="get"` attribute in our HTML output. Instead, we get no
`data-method` attribute, which is a lot better and cleaner.

I had originally used `:get` as a default because I wanted to generalise
links and certain ones we create need `:delete` or `:put` methods. I
figured, since we're always going to be passing `method:` to `link_to`,
we should have a sane default for that option. However, using `nil` is
even better as a default because then we don't get an extra attribute in
our HTML at all.

Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't set links as `method: :get` by default. This shows up as:

    link_to _, _, method: :get

If we set the method to `nil` instead, we don't get a
`data-method="get"` attribute in our HTML output. Instead, we get no
`data-method` attribute, which is a lot better and cleaner.

I had originally used `:get` as a default because I wanted to generalise
links and certain ones we create need `:delete` or `:put` methods. I
figured, since we're always going to be passing `method:` to `link_to`,
we should have a sane default for that option. However, using `nil` is
even better as a default because then we don't get an extra attribute in
our HTML at all.

Refs #3479
</pre>
</div>
</content>
</entry>
<entry>
<title>referentials/show.html.slim: Extract header buttons to a decorator</title>
<updated>2017-06-12T16:59:23+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-12T16:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=07ed048cd2f2231fa26345a94c725363344ee77b'/>
<id>07ed048cd2f2231fa26345a94c725363344ee77b</id>
<content type='text'>
Add a new `ReferentialDecorator` that we can use to define the links
that appear as buttons in the header of the `/referentials/:id` page.

The idea is that these links will take the place of the existing view
code and in the view, we'll instead loop over the links provided by the
decorator and render them as buttons.

I decided to do it this way because there's a requirement that the links
in the gear menu in tables show the same links that appear in the header
of the page. So the Workbenches#show page would show a table of
referentials, and their gear menu links should ostensibly be the same as
the header links in the Referentials#show page.

My goal was to abstract links, and try to separate them from the
presentation layer. Still having trouble with this though. I created a
new `Link` class to represent a link. We can then use this in the
template to create a `link_to`. It becomes messy, though, when we want
to put other elements inside a certain link, as evidenced by the
`:delete` link. Don't like how that's done, but still working out the
best approach to make it cleaner.

Refs #3479
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new `ReferentialDecorator` that we can use to define the links
that appear as buttons in the header of the `/referentials/:id` page.

The idea is that these links will take the place of the existing view
code and in the view, we'll instead loop over the links provided by the
decorator and render them as buttons.

I decided to do it this way because there's a requirement that the links
in the gear menu in tables show the same links that appear in the header
of the page. So the Workbenches#show page would show a table of
referentials, and their gear menu links should ostensibly be the same as
the header links in the Referentials#show page.

My goal was to abstract links, and try to separate them from the
presentation layer. Still having trouble with this though. I created a
new `Link` class to represent a link. We can then use this in the
template to create a `link_to`. It becomes messy, though, when we want
to put other elements inside a certain link, as evidenced by the
`:delete` link. Don't like how that's done, but still working out the
best approach to make it cleaner.

Refs #3479
</pre>
</div>
</content>
</entry>
</feed>
