2023-03-31 22:32:36 +00:00
|
|
|
- link = nil
|
|
|
|
- if site.not_published_yet?
|
|
|
|
- message = t('.not_published_yet')
|
|
|
|
- if site.building?
|
|
|
|
- if site.average_publication_time_calculable?
|
2023-03-31 22:37:47 +00:00
|
|
|
- average_building_time = site.average_publication_time
|
2023-03-31 22:32:36 +00:00
|
|
|
- elsif !site.similar_sites?
|
|
|
|
- average_building_time = 60
|
|
|
|
- else
|
|
|
|
- average_building_time = site.average_publication_time_for_similar_sites
|
|
|
|
|
|
|
|
- average_publication_time_human = distance_of_time_in_words average_building_time
|
|
|
|
- message = t('.building', average_time: average_publication_time_human, seconds: average_building_time)
|
|
|
|
- else
|
|
|
|
- message = t('.available')
|
|
|
|
- link = true
|
|
|
|
|
|
|
|
= render 'bootstrap/alert' do
|
2023-04-03 16:47:59 +00:00
|
|
|
= link_to_if link, message.html_safe, site.url, class: 'alert-link'
|