diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-15 11:15:53 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-15 11:22:28 +0100 |
| commit | 16739684bb7ca55d71c22cbd103ca8c058c33ecc (patch) | |
| tree | efb06331b0c96910d037e9ed8e23d39c4146487c /app/views | |
| parent | fd64bb953f4794b8cc79aa5149e761c77229f9d9 (diff) | |
| download | operum-16739684bb7ca55d71c22cbd103ca8c058c33ecc.tar.gz operum-16739684bb7ca55d71c22cbd103ca8c058c33ecc.zip | |
things: provide a simple way to follow links
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/things/_form.html.erb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/views/things/_form.html.erb b/app/views/things/_form.html.erb index 62058a9..4aa3dc7 100644 --- a/app/views/things/_form.html.erb +++ b/app/views/things/_form.html.erb @@ -39,9 +39,12 @@ <%= form.text_field :address, autocapitalize: 'on' %> </div> - <div> - <%= form.label :url %> - <%= form.text_field :url %> + <div data-controller="thing"> + <%= form.label :url do %> + <%= I18n.t('activerecord.attributes.thing.url') %> + <a id="thing-external-url-id" href="<%= thing.url %>" target="_blank" title="<%= I18n.t('things.go-to') %>" class="<%= 'hidden' if thing.url.blank? %>"><i class="gg-external"></i></a> + <% end %> + <%= form.text_field :url, "data-action": "thing#updateLink" %> </div> <div> |
