summaryrefslogtreecommitdiff
path: root/app/views/phone_numbers/_listing.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/phone_numbers/_listing.html.haml')
-rw-r--r--app/views/phone_numbers/_listing.html.haml8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/phone_numbers/_listing.html.haml b/app/views/phone_numbers/_listing.html.haml
new file mode 100644
index 0000000..ca002c5
--- /dev/null
+++ b/app/views/phone_numbers/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_phone_numbers = phone_numbers.count
+- if amount_of_phone_numbers > 0
+ - if amount_of_phone_numbers < 110
+ = phone_numbers.map{|number| number}.join(', ')
+ - else
+ = phone_numbers.limit(30).map{|number| number}.join(', ') + ', '
+ = '[...]'
+ = phone_numbers.offset(amount_of_phone_numbers - 30).map{|number| number}.join(', ') \ No newline at end of file