emails.naml

<override_macro name="digest_text" requires="subscription,node_list" unindent="true">
  <n.set_local_subscription.this_subscription/>
  <t>Digest Email</t>
  "<n.local_subscription.node.subject/>"
  <n.digest_post_count/>

  <n.reset_list_index/>
  <n.loop.>
    <n.if.local_subscription.user.can_view.current_node>
      <then>
        [<n.current_node.digest_subject/>]
        <n.compress.>
          <n.truncate. size="200">
            <n.current_node.message.as_text/>
          </n.truncate.>
        </n.compress.>
        <n.compress.>
          <t>by <t.author.current_node.owner.name/></t>
          <t>on <t.date.current_node.when_created.custom_format format="yyyy-MM-dd"/></t>
          <t>in <t.location.current_node.get_app_node.subject/></t>
        </n.compress.>

        <t>Read more</t>
        <n.current_node.url/>


        <n.nop/>
      </then>
    </n.if.local_subscription.user.can_view.current_node>
  </n.loop.>
  <n.unsubscribe_line format="text"/>

  ---
  <t>DO NOT REPLY TO THIS EMAIL</t>

  <t>Replies sent to this message are not read or processed.</t>
  <t>If you want to respond to a post, please visit: <t.url.local_subscription.node.url/></t>
</override_macro>

<override_macro name="digest_html" requires="subscription,node_list" unindent="true">
  <n.set_local_subscription.this_subscription/>
  <h2><t>Digest Email</t></h2>
  <h3><n.local_subscription.node.subject/></h3>
  <div style="color:#666666;font-weight:bold">
    <n.digest_post_count/>
  </div>

  <n.reset_list_index/>
  <n.loop.>
    <n.if.local_subscription.user.can_view.current_node>
      <then>
        <p>
          <div style="font-size:120%">
            <a href="[n.current_node.url/]"><n.current_node.digest_subject/></a>
          </div>
          <n.trim.truncate. size="200">
            <n.compress.current_node.message.as_text/>
          </n.trim.truncate.>
          <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
            <t>by <t.author><b><n.current_node.owner.name/></b></t.author></t>
            <t>on <t.date.current_node.when_created.custom_format format="yyyy-MM-dd"/></t>
            <t>in <t.location><i><n.current_node.get_app_node.subject/></i></t.location></t>
          </div>
        </p>
      </then>
    </n.if.local_subscription.user.can_view.current_node>
  </n.loop.>

  <br/>
  <br/>
  <n.unsubscribe_line format="html"/>

  <hr noshade="noshade" size="1" color="#cccccc" />
  <div style="color:#666666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
    <t>DO NOT REPLY TO THIS EMAIL</t><br/>
    <br/>
    <t>Replies sent to this address are not read or processed.</t>
    <t>If you want to respond to a post, please visit: <t.url.local_subscription.node.url/></t>
  </div>
</override_macro>