Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We will now use the Add Page macro to add a "Create Task Page" button to the dashboard.

...

For more information on how to use this source code on your Confluence, read the following article:


Expand
titleClick here for the source code...


Code Block
<ac:structured-macro ac:macro-id="821765a4-504e-4bbc-916b-90a44b572f31" ac:name="hide-if" ac:schema-version="1">
  <ac:parameter ac:name="user">
    <ri:user ri:userkey="2c9180826c60d61d016c6aa381b80002"/>
    <ri:user ri:userkey="2c9180826b456b39016b456c262a0000"/>
  </ac:parameter>
  <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
  <ac:rich-text-body>
    <table class="wrapped" style="margin-left: 780.0px;">
      <colgroup>
        <col/>
      </colgroup>
      <tbody style="margin-left: 780.0px;">
        <tr style="margin-left: 780.0px;">
          <th>
            <div class="content-wrapper">
              <p>
                <ac:structured-macro ac:macro-id="68cd50ca-00f8-4982-9c07-9a74c4dff09a" ac:name="add-page" ac:schema-version="1">
                  <ac:parameter ac:name="name">%global:current user&gt;user:name%</ac:parameter>
                  <ac:parameter ac:name="linkText">Create Task Page</ac:parameter>
                  <ac:parameter ac:name="source">Task</ac:parameter>
                  <ac:parameter ac:name="live">true</ac:parameter>
                </ac:structured-macro>
              </p>
            </div>
          </th>
        </tr>
      </tbody>
    </table>
  </ac:rich-text-body>
</ac:structured-macro>


Steps

  1. Add a Hide If macro and set User parameter to "admin"  and "product-manager".
    The purpose of the Hide If macro used in this example is to keep the button hidden from user admin and Product Manager.

  2. Then add a 1x1 table in the Hide If macro, color it as desired. (Grey is used in this example.)

  3. Within the table create an Add Page macro.
    Set the Name parameter to "%global:current user > user>name%" . (This will create a task list with the current user name.)
    Set the Link Text parameter to "Create Task List".
    Set Source parameter to "Task"  template and check the Live Template parameter.

...