Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aesmail/kaffy
Browse files Browse the repository at this point in the history
  • Loading branch information
aesmail committed Oct 6, 2023
2 parents 3afc298 + 90c1d25 commit 0870fa8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: aesmail
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
38 changes: 22 additions & 16 deletions lib/kaffy/resource_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -357,23 +357,28 @@ defmodule Kaffy.ResourceForm do
number_input(form, field,
class: "form-control",
id: field,
disabled: opts[:readonly],
aria_describedby: field
),
content_tag :div, class: "input-group-append" do
content_tag :span, class: "input-group-text", id: field do
link(content_tag(:i, "", class: "fas fa-search"),
to:
Kaffy.Utils.router().kaffy_resource_path(
conn,
:index,
target_context,
target_resource,
c: conn.params["context"],
r: conn.params["resource"],
pick: field
),
id: "pick-raw-resource"
)
if opts[:readonly] do
""
else
content_tag :div, class: "input-group-append" do
content_tag :span, class: "input-group-text", id: field do
link(content_tag(:i, "", class: "fas fa-search"),
to:
Kaffy.Utils.router().kaffy_resource_path(
conn,
:index,
target_context,
target_resource,
c: conn.params["context"],
r: conn.params["resource"],
pick: field
),
id: "pick-raw-resource"
)
end
end
end
]
Expand Down Expand Up @@ -410,7 +415,8 @@ defmodule Kaffy.ResourceForm do
Enum.map(options, fn o ->
{Map.get(o, string_field, "Resource ##{o.id}"), o.id}
end),
class: "custom-select"
class: "custom-select",
disabled: opts[:readonly]
)
end

Expand Down

0 comments on commit 0870fa8

Please sign in to comment.