diff --git a/app/models/website.rb b/app/models/website.rb index a8e5f2d0d..caa1dfb62 100644 --- a/app/models/website.rb +++ b/app/models/website.rb @@ -205,6 +205,10 @@ def tld? domain.split('.').size == 2 end + def organization_name + organization ? organization.name : nil + end + def login_supported return false if self.authentication_tool == nil return false if self.authentication_tool == "" diff --git a/app/serializers/website_serializer.rb b/app/serializers/website_serializer.rb index d60feebb6..08ec7c4b6 100644 --- a/app/serializers/website_serializer.rb +++ b/app/serializers/website_serializer.rb @@ -3,6 +3,8 @@ class WebsiteSerializer < ActiveModel::Serializer attributes :id, :domain, + :organization_id, + :organization_name, :parent_domain, :office, # :office_id, @@ -27,6 +29,8 @@ class WebsiteSerializer < ActiveModel::Serializer :uses_feedback, :feedback_tool, :sitemap_url, + :backlog_tool, + :backlog_url, :mobile_friendly, :has_search, :uses_tracking_cookies, diff --git a/app/views/admin/websites/_step_indicator.html.erb b/app/views/admin/websites/_step_indicator.html.erb index 24ce10271..ad945a56d 100644 --- a/app/views/admin/websites/_step_indicator.html.erb +++ b/app/views/admin/websites/_step_indicator.html.erb @@ -1,4 +1,4 @@ -
+
Publication status: @@ -47,27 +47,32 @@
  1. + <%= "usa-step-indicator__segment--complete" if website.submitted? || website.published? || website.archived? %> <%= "usa-step-indicator__segment--current" if website.created? %>" aria-current="true"> Created
  2. + <%= "usa-step-indicator__segment--complete" if website.published? || website.archived? %> <%= "usa-step-indicator__segment--current" if website.submitted? %>" aria-current="true"> Submitted
  3. + <%= "usa-step-indicator__segment--complete" if website.published? || website.archived? %> <%= "usa-step-indicator__segment--current" if website.published? %>" aria-current="true"> Published
  4. +
  5. + <%= "usa-step-indicator__segment--current" if website.archived? %>" aria-current="true"> + Archived +
-
+
Website lifecycle status: @@ -116,19 +121,28 @@
  1. + <%= "usa-step-indicator__segment--complete" if website.staging? || website.production? || website.redirect? || website.decommissioned? %> <%= "usa-step-indicator__segment--current" if website.in_development? %>" aria-current="true"> In development
  2. -
  3. <%= "usa-step-indicator__segment--current" if website.staging? %>" aria-current="true"> +
  4. + <%= "usa-step-indicator__segment--current" if website.staging? %>" aria-current="true"> Staging
  5. -
  6. <%= "usa-step-indicator__segment--current" if website.production? %>" aria-current="true"> +
  7. + <%= "usa-step-indicator__segment--current" if website.production? %>" aria-current="true"> Production
  8. " aria-current="true"> + <%= "usa-step-indicator__segment--complete" if website.redirect? || website.decommissioned? %> + <%= "usa-step-indicator__segment--current" if website.redirect? %>" aria-current="true"> + Redirect +
  9. +
  10. " aria-current="true"> Decommissioned
diff --git a/spec/controllers/api/v1/websites_controller_spec.rb b/spec/controllers/api/v1/websites_controller_spec.rb index f9906512c..bfafb9855 100644 --- a/spec/controllers/api/v1/websites_controller_spec.rb +++ b/spec/controllers/api/v1/websites_controller_spec.rb @@ -60,6 +60,12 @@ expect(@parsed_response['data'].size).to eq(2) expect(@parsed_response['data'].first.class).to be(Hash) expect(@parsed_response['data'].first['type']).to eq("websites") + + expect(@parsed_response['data'].first['attributes'].keys).to include("domain") + expect(@parsed_response['data'].first['attributes'].keys).to include("organization_id") + expect(@parsed_response['data'].first['attributes'].keys).to include("organization_name") + expect(@parsed_response['data'].first['attributes'].keys).to include("backlog_tool") + expect(@parsed_response['data'].first['attributes'].keys).to include("backlog_url") end end end