<commit_before><%def name="news_entry(entry, short)">
<%
    if entry.is_deleted:
        if not c.auth_user.can('admin.auth'):
            return ''
        extra_class = ' deleted'
    else:
        extra_class = ''
%>
<div class="entry${extra_class}">
    <div class="header">
        <div class="title">${entry.title}</div>
        <div class="avatar">
            % if not entry.is_anonymous:
            ${h.image_tag(h.get_avatar_url(entry), entry.user.username)}
            % else:
            <img src="${h.get_avatar_url()}" alt="default avatar"/>
            % endif
        </div>
        <%
            if entry.is_anonymous:
                author_string = 'FA Staff'
            else:
                author_string = capture(user_link, entry.user)
        %>
        <div class="author">By: ${author_string}</div>
        <div class="date">Date: ${h.format_time(entry.time)}</div>
    </div>
    <div class="content">
        % if short:
            ${entry.content_short}
        % else:
            ${entry.content_parsed}
        % endif
    </div>
    % if c.auth_user.can('admin.auth'):
    ${c.empty_form.start(h.url(controller='news', action='edit', id=entry.id), method='post')}
    <ul class="inline admin">
        <li>${h.link_to('Edit', h.url(controller='news', action='edit', id=entry.id))}</li>
        % if entry.is_deleted:
        <li>${c.empty_form.submit('Undelete')}</li>
        % else:
        <li>${c.empty_form.submit('Delete')}</li>
        % endif
    </ul>
    ${c.empty_form.end()}
    % endif

<% news_url = h.url_for(controller='news', action='view', id=entry.id) %>
    <ul class="inline">
        <li>${h.link_to('View comments', h.url(controller='comments', action='view', post_url=news_url))}</li>
        <li>${h.link_to('Reply', h.url(controller='comments', action='reply', post_url=news_url))}</li>
    </ul>
</div>
</%def>

<%def name="journal_entry(entry, short)">
<%
    if entry.status == 'deleted':
        if not c.auth_user.can('admin.auth'):
            return ''
        extra_class = ' deleted'
    else:
        extra_class = ''
%>
<div class="entry${extra_class}">
    <div class="header">
        <div class="title">${h.link_to(entry.title, h.url(controller='journal', action='view', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id))}</div>
        <div class="avatar">${h.image_tag(h.get_avatar_url(entry), entry.user.display_name)}</div>
        <div class="author">By: ${user_link(entry.user)}</div>
        <div class="date">Date: ${h.format_time(entry.time)}</div>
    </div>
    <div class="content">
        % if short:
            ${entry.content_short}
        % else:
            ${entry.content_parsed}
        % endif
    </div>
    % if c.auth_user.can('admin.auth'):
    ${c.empty_form.start(h.url(controller='journal', action='edit', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id), method='post')}
    <ul class="inline admin">
        <li>${h.link_to("Edit", h.url(controller='journal', action='edit', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id))}</li>
        % if entry.status == 'deleted':
        <li>${c.empty_form.submit('Undelete')}</li>
        % else:
        <li>${c.empty_form.submit('Delete')}</li>
        % endif
    </ul>
    ${c.empty_form.end()}
    % endif
</div>
</%def>

<%def name="note_entry(note, owner)">
<div class="entry">
<%
    icon = ''
    if note.status == 'unread':
        icon = h.image_tag('/images/icons/mail-unread.png', 'Unread')
%>
    <div class="header">
        <div class="title">${note.title}${icon}</div>
        <div class="avatar">${h.image_tag(h.get_avatar_url(owner), owner.display_name)}</div>
        % if note.sender == owner:
        <div class="author">${h.image_tag('/images/icons/go-next.png', 'Sent to')} ${user_link(note.recipient)}</div>
        % else:
        <div class="author">${h.image_tag('/images/icons/go-previous.png', 'Received from')} ${user_link(note.sender)}</div>
        % endif
        <div class="date">Date: ${h.format_time(note.time)}</div>
    </div>
    <ul class="micro-linkbar">
        <li>${h.link_to("%s Reply" % h.image_tag('/images/icons/mail-reply-sender.png', ''), h.url(controller='notes', action='reply', username=c.route['username'], id=note.id))}</li>
        <li>${h.link_to("%s Forward" % h.image_tag('/images/icons/mail-forward.png', ''), h.url(controller='notes', action='forward', username=c.route['username'], id=note.id))}</li>
    </ul>
    <div class="content">
        ${note.content_parsed}
    </div>
</div>
</%def>

<%def name="note_collapsed_entry(note, owner)">
<div class="entry collapsed">
    <div class="header">
        <div class="title">${h.link_to(note.title, h.url(controller='notes', action='view', username=owner.username, id=note.id), class_='js-expand-note')}</div>
    </div>
</div>
</%def>

<%def name="user_link(user, care_about_online=True)">
<span class="userlink">
    <a href="${h.url_for(controller='user', action='view', username=user.username)}"><img src="/images/foxy.gif" alt="[user]"/></a>
    <a href="${h.url_for(controller='user', action='view', username=user.username)}" class="js-userlink-target">maxblackrabbit</a>
</span>
</%def>

<%def name="user_linkbar(user)">
<div id="user-header">
    ${h.image_tag(h.get_avatar_url(), '[default avatar]', class_='avatar')}
    <div id="user-header-name">
        <span id="user-header-name-handle">${user.role.sigil}${user.display_name}</span>
        <span id="user-header-name-alias" class="TODO">aka..  Eevee?</span>
        % if c.auth_user:
        ${h.link_to("%s %s %s" % ( \
            h.image_tag('/images/icons/rel-friend-off.png', 'Not a friend'), \
            h.image_tag('/images/icons/rel-watching-off.png', 'Not watched'), \
            h.image_tag('/images/icons/rel-blocked-off.png', 'Not blocked'), \
        ), h.url_for(controller='user', action='relationships_edit', username=c.auth_user.username, other_user=user.username), class_='TODO button')}
        ${h.link_to("%s Send note" % h.image_tag('/images/icons/link-user-note.png', ''), h.url_for(controller='notes', action='write', username=c.auth_user.username, recipient=user.username), class_='button')}
        % endif
    </div>
    <div id="user-header-status">${user.role.name} since <span class="TODO">Aug 15, 2006</span></div><commit_msg>Undid temporary debugging change in user_link.  (#120)<commit_after><%def name="news_entry(entry, short)">
<%
    if entry.is_deleted:
        if not c.auth_user.can('admin.auth'):
            return ''
        extra_class = ' deleted'
    else:
        extra_class = ''
%>
<div class="entry${extra_class}">
    <div class="header">
        <div class="title">${entry.title}</div>
        <div class="avatar">
            % if not entry.is_anonymous:
            ${h.image_tag(h.get_avatar_url(entry), entry.user.username)}
            % else:
            <img src="${h.get_avatar_url()}" alt="default avatar"/>
            % endif
        </div>
        <%
            if entry.is_anonymous:
                author_string = 'FA Staff'
            else:
                author_string = capture(user_link, entry.user)
        %>
        <div class="author">By: ${author_string}</div>
        <div class="date">Date: ${h.format_time(entry.time)}</div>
    </div>
    <div class="content">
        % if short:
            ${entry.content_short}
        % else:
            ${entry.content_parsed}
        % endif
    </div>
    % if c.auth_user.can('admin.auth'):
    ${c.empty_form.start(h.url(controller='news', action='edit', id=entry.id), method='post')}
    <ul class="inline admin">
        <li>${h.link_to('Edit', h.url(controller='news', action='edit', id=entry.id))}</li>
        % if entry.is_deleted:
        <li>${c.empty_form.submit('Undelete')}</li>
        % else:
        <li>${c.empty_form.submit('Delete')}</li>
        % endif
    </ul>
    ${c.empty_form.end()}
    % endif

<% news_url = h.url_for(controller='news', action='view', id=entry.id) %>
    <ul class="inline">
        <li>${h.link_to('View comments', h.url(controller='comments', action='view', post_url=news_url))}</li>
        <li>${h.link_to('Reply', h.url(controller='comments', action='reply', post_url=news_url))}</li>
    </ul>
</div>
</%def>

<%def name="journal_entry(entry, short)">
<%
    if entry.status == 'deleted':
        if not c.auth_user.can('admin.auth'):
            return ''
        extra_class = ' deleted'
    else:
        extra_class = ''
%>
<div class="entry${extra_class}">
    <div class="header">
        <div class="title">${h.link_to(entry.title, h.url(controller='journal', action='view', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id))}</div>
        <div class="avatar">${h.image_tag(h.get_avatar_url(entry), entry.user.display_name)}</div>
        <div class="author">By: ${user_link(entry.user)}</div>
        <div class="date">Date: ${h.format_time(entry.time)}</div>
    </div>
    <div class="content">
        % if short:
            ${entry.content_short}
        % else:
            ${entry.content_parsed}
        % endif
    </div>
    % if c.auth_user.can('admin.auth'):
    ${c.empty_form.start(h.url(controller='journal', action='edit', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id), method='post')}
    <ul class="inline admin">
        <li>${h.link_to("Edit", h.url(controller='journal', action='edit', username=entry.user.username, year=entry.time.year, month=entry.time.month, day=entry.time.day, id=entry.id))}</li>
        % if entry.status == 'deleted':
        <li>${c.empty_form.submit('Undelete')}</li>
        % else:
        <li>${c.empty_form.submit('Delete')}</li>
        % endif
    </ul>
    ${c.empty_form.end()}
    % endif
</div>
</%def>

<%def name="note_entry(note, owner)">
<div class="entry">
<%
    icon = ''
    if note.status == 'unread':
        icon = h.image_tag('/images/icons/mail-unread.png', 'Unread')
%>
    <div class="header">
        <div class="title">${note.title}${icon}</div>
        <div class="avatar">${h.image_tag(h.get_avatar_url(owner), owner.display_name)}</div>
        % if note.sender == owner:
        <div class="author">${h.image_tag('/images/icons/go-next.png', 'Sent to')} ${user_link(note.recipient)}</div>
        % else:
        <div class="author">${h.image_tag('/images/icons/go-previous.png', 'Received from')} ${user_link(note.sender)}</div>
        % endif
        <div class="date">Date: ${h.format_time(note.time)}</div>
    </div>
    <ul class="micro-linkbar">
        <li>${h.link_to("%s Reply" % h.image_tag('/images/icons/mail-reply-sender.png', ''), h.url(controller='notes', action='reply', username=c.route['username'], id=note.id))}</li>
        <li>${h.link_to("%s Forward" % h.image_tag('/images/icons/mail-forward.png', ''), h.url(controller='notes', action='forward', username=c.route['username'], id=note.id))}</li>
    </ul>
    <div class="content">
        ${note.content_parsed}
    </div>
</div>
</%def>

<%def name="note_collapsed_entry(note, owner)">
<div class="entry collapsed">
    <div class="header">
        <div class="title">${h.link_to(note.title, h.url(controller='notes', action='view', username=owner.username, id=note.id), class_='js-expand-note')}</div>
    </div>
</div>
</%def>

<%def name="user_link(user, care_about_online=True)">
<span class="userlink">
    <a href="${h.url_for(controller='user', action='view', username=user.username)}"><img src="/images/foxy.gif" alt="[user]"/></a>
    <a href="${h.url_for(controller='user', action='view', username=user.username)}" class="js-userlink-target">${user.username}</a>
</span>
</%def>

<%def name="user_linkbar(user)">
<div id="user-header">
    ${h.image_tag(h.get_avatar_url(), '[default avatar]', class_='avatar')}
    <div id="user-header-name">
        <span id="user-header-name-handle">${user.role.sigil}${user.display_name}</span>
        <span id="user-header-name-alias" class="TODO">aka..  Eevee?</span>
        % if c.auth_user:
        ${h.link_to("%s %s %s" % ( \
            h.image_tag('/images/icons/rel-friend-off.png', 'Not a friend'), \
            h.image_tag('/images/icons/rel-watching-off.png', 'Not watched'), \
            h.image_tag('/images/icons/rel-blocked-off.png', 'Not blocked'), \
        ), h.url_for(controller='user', action='relationships_edit', username=c.auth_user.username, other_user=user.username), class_='TODO button')}
        ${h.link_to("%s Send note" % h.image_tag('/images/icons/link-user-note.png', ''), h.url_for(controller='notes', action='write', username=c.auth_user.username, recipient=user.username), class_='button')}
        % endif
    </div>
    <div id="user-header-status">${user.role.name} since <span class="TODO">Aug 15, 2006</span></div>
{'fraction_non_alphanumeric': 0.21202556008930634, 'fraction_numerical': 0.001154823312033259, 'mean_word_length': 3.22576447625244, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 0, '>': 229, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7366365', 'n_tokens_mistral': 4553, 'n_tokens_neox': 4488, 'n_words': 663}