Objectives

Now let's build the next component: the Recently Modified View Panel.

This will allow an admin immediate access to pages on the Confluence instance that were modified within the last 24 hours as well as show other relevant info about the pages.

Steps

  1. Create a Report Table macro and set Maximum Results to "100".
  2. Within the Report Table, create a Content Reporter macro and set Types to "page".
  3. Within the Content Reporter macro, create a Date Sort macro and set the Key to content:modification date.
  4. Still within the Content Reporter macro, create a Date Filter macro and set the Key to content:modification date.
  5. Back within the Report Table, create a Report Column macro and set the Title to "Page Title" and check the Injected parameter is True.
  6. Within the Report Column, create a Report Info macro and set the Key to content:title and make sure Link To Item is True.
  7. Create another Report Column with the Title "Space".
  8. Within this Report Column, create a Report Info macro and set the Key to content:space and make sure Link To Item is True.
  9. Create another Report Column with the Title "Attachments".
  10. Within that Report Column, create a Report Info macro and set the Key to content:attachments > collection:size.
  11. Create another Report Column with the Title "Version".
  12. Within that Report Column, create a Report Info macro and set the Key to content:version.
  13. Create another Report Column with the Title "Category".
  14. Within that Report Column, create a Report Info macro and set the Key to content:labels.
  15. Create another Report Column with the Title "Last Modified".
  16. Within that Report Column, create two Report Info macros, one with the Key set to content:modification date, and the other content:modifier. Ensure the latter Report Info macro also has the Link To Item parameter set to True.
  17. Create another Report Column with the Title "Links" and check the Injected parameter is set to True.
  18. Within the Report Column, create a Link to Location macro and set Location to "page info", Link Text to "Page Info", and Content to %title%.
  19. Still within the same Report Column, create another Link to Location macro and set Location to "page history", Link Text to "History", and Content to %title%.
  20. Create another Report Column with the Title "Actions" and check the Injected parameter is set to True.
  21. Within the Report Column, create a Link to Location macro and set Location to "page edit", Link Text to "Edit", and Content to %title%.
  22. Still within the same Report Column, create another Link to Location macro and set Location to "page remove", Link Text to "Remove", and Content to %title%.

Editor View

Your editor should now look something like this:

Storage Format

The following storage format code also incorporates code from Part 1.

<ac:layout>
  <ac:layout-section ac:type="three_equal">
    <ac:layout-cell>
      <p>
        <br/>
      </p>
      <p class="auto-cursor-target">
        <br/>
      </p>
      <ac:structured-macro ac:macro-id="8903159b-04da-4a00-8679-78dcf64293bc" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#36B37E</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;"> </h2>
          <h2 style="text-align: center;">Edited in the last 24h</h2>
          <ac:structured-macro ac:macro-id="5be23bb4-7f0f-4005-9f78-20b3c2f1c35b" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="94fcd368-faa5-441e-bff4-e1f2ada33ccf" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">page</ac:parameter>
                <ac:rich-text-body>
                  <h1> <ac:structured-macro ac:macro-id="cd8360c2-2657-49ff-a745-dffa7148a0f9" ac:name="date-filter" ac:schema-version="1">
                      <ac:parameter ac:name="minValue">-1m</ac:parameter>
                      <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                      <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                      <ac:parameter ac:name="">content:modification date</ac:parameter>
                    </ac:structured-macro>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="aa9b7107-1cd0-4390-b0e1-469ff008b92b" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <ac:structured-macro ac:macro-id="f8c60628-4721-43cb-b69f-4fb83b026077" ac:name="report-info" ac:schema-version="1">
                      <ac:parameter ac:name="">report:query&gt;collection:size</ac:parameter>
                    </ac:structured-macro> Pages</h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p class="auto-cursor-target">
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="d76f9ad9-3a28-40ac-a839-d6550b302eb4" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                  <ac:structured-macro ac:macro-id="e14931f4-f5f1-4415-aa69-e7d9d44a8833" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h1>
                        <ac:structured-macro ac:macro-id="3b421be3-11b8-456b-9e9d-c847f2635379" ac:name="report-info" ac:schema-version="1">
                          <ac:parameter ac:name="">content:title</ac:parameter>
                        </ac:structured-macro>
                      </h1>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p class="auto-cursor-target">
                <br/>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <p>
            <br/>
          </p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <p class="auto-cursor-target">
        <br/>
      </p>
    </ac:layout-cell>
    <ac:layout-cell>
      <p class="auto-cursor-target">
        <br/>
      </p>
      <ac:structured-macro ac:macro-id="126252d6-7180-46e1-a247-2577d56712bb" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#00B8D9</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;"> </h2>
          <h2 style="text-align: center;">Created in the last 24h</h2>
          <ac:structured-macro ac:macro-id="5ce2d14b-3234-4e66-8a0c-2ea0078cf45b" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="7c647e70-8cd8-4988-b43f-60767aa4791d" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">page</ac:parameter>
                <ac:rich-text-body>
                  <h2> <ac:structured-macro ac:macro-id="4c8cbade-6d82-4242-a745-9e5f7da1e9c1" ac:name="date-filter" ac:schema-version="1">
                      <ac:parameter ac:name="minValue">-1d</ac:parameter>
                      <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                      <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                      <ac:parameter ac:name="">content:creation date</ac:parameter>
                    </ac:structured-macro>
                  </h2>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="b81d9955-cac0-48b2-b439-fdd12ebcaeb0" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <ac:structured-macro ac:macro-id="639aa3c0-cc0d-4a80-9ba7-01bb65e0f585" ac:name="report-info" ac:schema-version="1">
                      <ac:parameter ac:name="">report:query&gt;collection:size</ac:parameter>
                    </ac:structured-macro> Pages</h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p class="auto-cursor-target">
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="7f12049d-f107-4f44-8c47-fff669a74a2c" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                  <ac:structured-macro ac:macro-id="9ca89724-cee8-4f46-952d-2102941a193d" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h1>
                        <ac:structured-macro ac:macro-id="6297c13e-0f4a-40f1-a13b-8623e5310f95" ac:name="report-info" ac:schema-version="1">
                          <ac:parameter ac:name="">content:title</ac:parameter>
                        </ac:structured-macro>
                      </h1>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p class="auto-cursor-target">
                <br/>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <p>
            <br/>
          </p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <p class="auto-cursor-target">
        <br/>
      </p>
    </ac:layout-cell>
    <ac:layout-cell>
      <p class="auto-cursor-target">
        <br/>
      </p>
      <ac:structured-macro ac:macro-id="1a6a2ca1-fa36-4c2c-8045-5b73f36d45e6" ac:name="panel" ac:schema-version="1">
        <ac:parameter ac:name="bgColor">#FFAB00</ac:parameter>
        <ac:parameter ac:name="borderWidth">0</ac:parameter>
        <ac:rich-text-body>
          <h2 style="text-align: center;"> </h2>
          <h2 style="text-align: center;">Comments in the last 24h</h2>
          <ac:structured-macro ac:macro-id="4e06cbbe-f21e-42bc-befb-195f0aadc88e" ac:name="report-block" ac:schema-version="1">
            <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
            <ac:rich-text-body>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="e5fe9946-b959-4a08-b70f-a00335d18eae" ac:name="content-reporter" ac:schema-version="1">
                <ac:parameter ac:name="types">comment</ac:parameter>
                <ac:rich-text-body>
                  <h1> <ac:structured-macro ac:macro-id="30a72078-8b90-4a99-9501-01dc6a1ac1ad" ac:name="date-filter" ac:schema-version="1">
                      <ac:parameter ac:name="minValue">-3m</ac:parameter>
                      <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                      <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                      <ac:parameter ac:name="">content:modification date</ac:parameter>
                    </ac:structured-macro>
                  </h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="c56f33fc-1e92-478c-8a10-c205f2978ee2" ac:name="report-header" ac:schema-version="1">
                <ac:rich-text-body>
                  <h1 style="text-align: center;">
                    <ac:structured-macro ac:macro-id="4f74f1ff-290d-488c-a9e3-a3e63d04a6e8" ac:name="report-info" ac:schema-version="1">
                      <ac:parameter ac:name="">report:query&gt;collection:size</ac:parameter>
                    </ac:structured-macro> Comments</h1>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p>
                <br/>
              </p>
              <ac:structured-macro ac:macro-id="70cc4bf3-4769-47ec-8208-424c7c36e2a0" ac:name="report-body" ac:schema-version="1">
                <ac:rich-text-body>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                  <ac:structured-macro ac:macro-id="daf66cf9-2757-4824-8933-fa02902871e7" ac:name="hidden-data" ac:schema-version="1">
                    <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
                    <ac:rich-text-body>
                      <h1>
                        <ac:structured-macro ac:macro-id="aa0576c5-2eda-411f-aed4-af3ee25bf84c" ac:name="report-info" ac:schema-version="1">
                          <ac:parameter ac:name="">content:title</ac:parameter>
                        </ac:structured-macro>
                      </h1>
                    </ac:rich-text-body>
                  </ac:structured-macro>
                  <p class="auto-cursor-target">
                    <br/>
                  </p>
                </ac:rich-text-body>
              </ac:structured-macro>
              <p class="auto-cursor-target">
                <br/>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <p>
            <br/>
          </p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <p class="auto-cursor-target">
        <br/>
      </p>
    </ac:layout-cell>
  </ac:layout-section>
  <ac:layout-section ac:type="single">
    <ac:layout-cell>
      <h2>Recently Modified</h2>
      <ac:structured-macro ac:macro-id="c90db81c-c627-45e3-b56a-e25e08b9193b" ac:name="report-table" ac:schema-version="1">
        <ac:parameter ac:name="maxResults">100</ac:parameter>
        <ac:rich-text-body>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="89b8c391-eb5f-4476-87f2-fbe379b5d65b" ac:name="content-reporter" ac:schema-version="1">
            <ac:parameter ac:name="types">page</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="488e0656-edbe-4960-97e1-ace4b61e081b" ac:name="date-sort" ac:schema-version="1">
                  <ac:parameter ac:name="order">descending</ac:parameter>
                  <ac:parameter ac:name="">content:modification date</ac:parameter>
                </ac:structured-macro>
              </p>
              <p>
                <ac:structured-macro ac:macro-id="d51b35d2-62e1-4968-9b3a-21257f2ac785" ac:name="date-filter" ac:schema-version="1">
                  <ac:parameter ac:name="minValue">-1m</ac:parameter>
                  <ac:parameter ac:name="beforeValue">+0d</ac:parameter>
                  <ac:parameter ac:name="relativeTo">%data:Relative To%</ac:parameter>
                  <ac:parameter ac:name="">content:modification date</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="75dbfaaa-bca7-4485-9e92-85cae655a75c" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="injected">true</ac:parameter>
            <ac:parameter ac:name="title">Page Title</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="964334db-6a98-443c-8362-601473d283a5" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">content:title</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="16fb1995-0f8f-4a51-b78b-eeb38b526b39" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Space</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="12c2c594-4ac2-4d4c-9d91-ed68c493733a" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">content:space</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="cec62587-d04c-4179-b79e-7a29107d8a63" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Attachments</ac:parameter>
            <ac:rich-text-body>
              <p style="text-align: center;">
                <ac:structured-macro ac:macro-id="16a86479-2508-4e43-84f1-187bd900bfcd" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="">content:attachments &gt; collection:size</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="a67914c5-2ec8-48d6-91ba-2dc95840a32c" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="injected">true</ac:parameter>
            <ac:parameter ac:name="title">Version</ac:parameter>
            <ac:rich-text-body>
              <p style="text-align: center;">
                <ac:structured-macro ac:macro-id="c9245c36-435a-4354-ba09-7b6eb37a98c2" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="">content:version</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="41695501-62fa-42a4-ac26-3502b817d8b6" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Category</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="ce7ca44c-5d28-4dfd-9866-4bcc458a585d" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="">content:labels</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="1c52c782-4454-45f9-994d-aa7f3c7b12da" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="title">Last Modified</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="d630bc82-747b-4e13-9f50-1e12f1544440" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="format">dd MMM, yyyy</ac:parameter>
                  <ac:parameter ac:name="">content:modification date</ac:parameter>
                </ac:structured-macro> by <ac:structured-macro ac:macro-id="f9666b9a-3d59-43fa-9dbc-d7247c2de043" ac:name="report-info" ac:schema-version="1">
                  <ac:parameter ac:name="link">true</ac:parameter>
                  <ac:parameter ac:name="">content:modifier</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="c91cfa63-dbcc-4641-b472-44e57f8a6615" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="injected">true</ac:parameter>
            <ac:parameter ac:name="title">Links</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="ea1afb9f-a386-43a1-913a-b1e7cf6236f7" ac:name="link-to" ac:schema-version="1">
                  <ac:parameter ac:name="linkText">Page Info</ac:parameter>
                  <ac:parameter ac:name="content">
                    <ac:link>
                      <ri:page ri:content-title="%title%"/>
                    </ac:link>
                  </ac:parameter>
                  <ac:parameter ac:name="">page info</ac:parameter>
                </ac:structured-macro> <ac:structured-macro ac:macro-id="1b0b9ccd-f2a4-4d72-b0e5-48d82df8776b" ac:name="link-to" ac:schema-version="1">
                  <ac:parameter ac:name="linkText">History</ac:parameter>
                  <ac:parameter ac:name="content">
                    <ac:link>
                      <ri:page ri:content-title="%title%"/>
                    </ac:link>
                  </ac:parameter>
                  <ac:parameter ac:name="">page history</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
          <ac:structured-macro ac:macro-id="fe1cf538-41e4-4485-94e0-87cf43ea1f14" ac:name="report-column" ac:schema-version="1">
            <ac:parameter ac:name="injected">true</ac:parameter>
            <ac:parameter ac:name="title">Actions</ac:parameter>
            <ac:rich-text-body>
              <p>
                <ac:structured-macro ac:macro-id="e1fa0a24-ccb9-42f2-bccf-737a47fef558" ac:name="link-to" ac:schema-version="1">
                  <ac:parameter ac:name="linkText">Edit</ac:parameter>
                  <ac:parameter ac:name="content">
                    <ac:link>
                      <ri:page ri:content-title="%title%"/>
                    </ac:link>
                  </ac:parameter>
                  <ac:parameter ac:name="">page edit</ac:parameter>
                </ac:structured-macro> <ac:structured-macro ac:macro-id="b0b1faf3-b960-4c11-b2cd-c5d10605a01a" ac:name="link-to" ac:schema-version="1">
                  <ac:parameter ac:name="linkText">Remove</ac:parameter>
                  <ac:parameter ac:name="content">
                    <ac:link>
                      <ri:page ri:content-title="%title%"/>
                    </ac:link>
                  </ac:parameter>
                  <ac:parameter ac:name="">page remove</ac:parameter>
                </ac:structured-macro>
              </p>
            </ac:rich-text-body>
          </ac:structured-macro>
          <p class="auto-cursor-target">
            <br/>
          </p>
        </ac:rich-text-body>
      </ac:structured-macro>
      <p class="auto-cursor-target">
        <br/>
      </p>
    </ac:layout-cell>
  </ac:layout-section>
</ac:layout>