{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/comments/87181423","pull_request_review_id":7802611,"id":87181423,"diff_hunk":"@@ -74,52 +74,75 @@ def framework_dashboard(framework_slug):\n     if declaration_status == 'unstarted' and framework['status'] == 'live':\n         abort(404)\n \n-    key_list = s3.S3(current_app.config['DM_COMMUNICATIONS_BUCKET']).list(framework_slug, load_timestamps=True)\n-    key_list.reverse()\n+    application_made = supplier_is_on_framework or (len(complete_drafts) > 0 and declaration_status == 'complete')\n+    lots_with_completed_drafts = [lot for lot in framework['lots'] if count_drafts_by_lot(complete_drafts, lot['slug'])]\n \n     first_page = content_loader.get_manifest(\n         framework_slug, 'declaration'\n     ).get_next_editable_section_id()\n+    framework_dates = content_loader.get_message(framework_slug, 'dates')\n+    framework_urls = content_loader.get_message(framework_slug, 'urls')\n \n     # filenames\n-    supplier_pack_filename = '{}-supplier-pack.zip'.format(framework_slug)\n     result_letter_filename = RESULT_LETTER_FILENAME\n+\n     countersigned_agreement_file = None\n     if supplier_framework_info and supplier_framework_info['countersignedPath']:\n         countersigned_agreement_file = degenerate_document_path_and_return_doc_name(\n             supplier_framework_info['countersignedPath']\n         )\n \n-    application_made = supplier_is_on_framework or (len(complete_drafts) > 0 and declaration_status == 'complete')\n-    lots_with_completed_drafts = [lot for lot in framework['lots'] if count_drafts_by_lot(complete_drafts, lot['slug'])]\n-\n-    last_modified = {\n-        'supplier_pack': get_last_modified_from_first_matching_file(\n-            key_list, framework_slug, \"communications/{}\".format(supplier_pack_filename)\n-        ),\n-        'supplier_updates': get_last_modified_from_first_matching_file(\n-            key_list, framework_slug, \"communications/updates/\"\n-        )\n-    }\n-\n-    # if supplier has returned agreement for framework with framework_agreement_version, show contract_submitted page\n-    if supplier_is_on_framework and framework['frameworkAgreementVersion'] and supplier_framework_info['agreementReturned']:  # noqa\n+    signed_agreement_document_name = None\n+    if supplier_is_on_framework and supplier_framework_info['agreementReturned']:\n         signed_agreement_document_name = degenerate_document_path_and_return_doc_name(\n             supplier_framework_info['agreementPath']\n         )\n-        return render_template(\n-            \"frameworks/contract_submitted.html\",\n-            document_name=signed_agreement_document_name,\n-            framework=framework,\n-            framework_live_date=content_loader.get_message(framework_slug, 'dates')['framework_live_date'],\n-            supplier_framework=supplier_framework_info,\n-            supplier_pack_filename=supplier_pack_filename,\n-            last_modified=last_modified,\n-        ), 200\n+\n+    key_list = s3.S3(current_app.config['DM_COMMUNICATIONS_BUCKET']).list(framework_slug, load_timestamps=True)\n+    key_list.reverse()\n+\n+    base_communications_files = {\n+        \"invitation\": {\n+            \"path\": \"communications/\",\n+            \"filename\": \"{}-invitation.pdf\".format(framework_slug),\n+        },\n+        \"proposed_agreement\": {\n+            \"path\": \"communications/\",\n+            \"filename\": \"{}-proposed-agreement.pdf\".format(framework_slug),\n+        },\n+        \"final_agreement\": {\n+            \"path\": \"communications/\",\n+            \"filename\": \"{}-final-agreement.pdf\".format(framework_slug),\n+        },\n+        \"call_off\": {\n+            \"path\": \"communications/\",\n+            \"filename\": \"{}-call-off.pdf\".format(framework_slug),\n+        },\n+        \"reporting_template\": {\n+            \"path\": \"communications/\",\n+            \"filename\": \"{}-reporting-template.xlsx\".format(framework_slug),","path":"app/main/views/frameworks.py","position":76,"original_position":76,"commit_id":"acbe4f0d8b5c794335c93de28487af4e9c6fc968","original_commit_id":"acbe4f0d8b5c794335c93de28487af4e9c6fc968","user":{"login":"TheDoubleK","id":6525554,"avatar_url":"https://avatars.githubusercontent.com/u/6525554?v=3","gravatar_id":"","url":"https://api.github.com/users/TheDoubleK","html_url":"https://github.com/TheDoubleK","followers_url":"https://api.github.com/users/TheDoubleK/followers","following_url":"https://api.github.com/users/TheDoubleK/following{/other_user}","gists_url":"https://api.github.com/users/TheDoubleK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDoubleK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDoubleK/subscriptions","organizations_url":"https://api.github.com/users/TheDoubleK/orgs","repos_url":"https://api.github.com/users/TheDoubleK/repos","events_url":"https://api.github.com/users/TheDoubleK/events{/privacy}","received_events_url":"https://api.github.com/users/TheDoubleK/received_events","type":"User","site_admin":false},"body":"I think this is going to be `.xls` rather than `xlsx`...","created_at":"2016-11-09T12:16:37Z","updated_at":"2016-11-09T12:16:37Z","html_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549#discussion_r87181423","pull_request_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549","_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/comments/87181423"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549#discussion_r87181423"},"pull_request":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549","id":92568169,"html_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549","diff_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/549","number":549,"state":"open","locked":false,"title":"[#131617119]framework_dashboard view: heavily refactor","user":{"login":"risicle","id":807447,"avatar_url":"https://avatars.githubusercontent.com/u/807447?v=3","gravatar_id":"","url":"https://api.github.com/users/risicle","html_url":"https://github.com/risicle","followers_url":"https://api.github.com/users/risicle/followers","following_url":"https://api.github.com/users/risicle/following{/other_user}","gists_url":"https://api.github.com/users/risicle/gists{/gist_id}","starred_url":"https://api.github.com/users/risicle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/risicle/subscriptions","organizations_url":"https://api.github.com/users/risicle/orgs","repos_url":"https://api.github.com/users/risicle/repos","events_url":"https://api.github.com/users/risicle/events{/privacy}","received_events_url":"https://api.github.com/users/risicle/received_events","type":"User","site_admin":false},"body":"Story https://www.pivotaltracker.com/story/show/131617119\r\n\r\nSuperficially splitting \"supplier packs\" into individual files, however this required changing a lot organizationally and improving a lot of the tests.\r\n\r\nApologies this is one great big changeset, it wasn't clear how much I would have to change when I started. Depends on frameworks 3.5.0 which isn't merged yet.","created_at":"2016-11-07T11:41:08Z","updated_at":"2016-11-09T12:16:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4c34079a176ff02c47668d19594c5d36130c881","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/549/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/statuses/acbe4f0d8b5c794335c93de28487af4e9c6fc968","head":{"label":"alphagov:ris-framework-dashboard-file-link-split","ref":"ris-framework-dashboard-file-link-split","sha":"acbe4f0d8b5c794335c93de28487af4e9c6fc968","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31256533,"name":"digitalmarketplace-supplier-frontend","full_name":"alphagov/digitalmarketplace-supplier-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend","description":"Frontend supplier application for the digital marketplace.","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/deployments","created_at":"2015-02-24T11:10:47Z","updated_at":"2016-10-24T15:23:17Z","pushed_at":"2016-11-09T11:45:16Z","git_url":"git://github.com/alphagov/digitalmarketplace-supplier-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-supplier-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend","homepage":null,"size":2862,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"1d34be9dbd4414dc084517049f29eb2363c58bf8","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31256533,"name":"digitalmarketplace-supplier-frontend","full_name":"alphagov/digitalmarketplace-supplier-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend","description":"Frontend supplier application for the digital marketplace.","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/deployments","created_at":"2015-02-24T11:10:47Z","updated_at":"2016-10-24T15:23:17Z","pushed_at":"2016-11-09T11:45:16Z","git_url":"git://github.com/alphagov/digitalmarketplace-supplier-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-supplier-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-supplier-frontend","homepage":null,"size":2862,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":4,"forks":9,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/549"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/549"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/issues/549/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/pulls/549/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/statuses/acbe4f0d8b5c794335c93de28487af4e9c6fc968"}}}}
{"actor":{"display_login":"TheDoubleK"}}