mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:01:42 +00:00
telefonos
This commit is contained in:
parent
0f87a0bef2
commit
b3b685232e
4 changed files with 12 additions and 3 deletions
|
@ -40,8 +40,6 @@ class MetadataSlug < MetadataTemplate
|
|||
|
||||
# Devuelve el título a menos que sea privado y no esté vacío
|
||||
def title
|
||||
unless post.title.private? && !post.title.try(:value).try(:blank?)
|
||||
post.title.try(:value).try(:to_s)
|
||||
end
|
||||
post.title.try(:value).try(:to_s) unless post.title.private? && !post.title.try(:value).try(:blank?)
|
||||
end
|
||||
end
|
||||
|
|
1
app/models/metadata_tel.rb
Normal file
1
app/models/metadata_tel.rb
Normal file
|
@ -0,0 +1 @@
|
|||
class MetadataTel < MetadataNumber; end
|
4
app/views/posts/attribute_ro/_tel.haml
Normal file
4
app/views/posts/attribute_ro/_tel.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
%tr{ id: attribute }
|
||||
%th= post_label_t(attribute, post: post)
|
||||
%td{ dir: dir, lang: locale }
|
||||
%a{ href: "tel:#{metadata.value}" }= metadata.value
|
6
app/views/posts/attributes/_tel.haml
Normal file
6
app/views/posts/attributes/_tel.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
.form-group
|
||||
= label_tag "post_#{attribute}", post_label_t(attribute, post: post)
|
||||
= telephone_field 'post', attribute, value: metadata.value,
|
||||
**field_options(attribute, metadata)
|
||||
= render 'posts/attribute_feedback',
|
||||
post: post, attribute: attribute, metadata: metadata
|
Loading…
Reference in a new issue