Commit dabaaa76 by Xavier Antoviaque

Merge pull request #391 from open-craft/eugeny/username-wrapper

Added wrapper around username and labels to allow for nowrap styling
parents cfec8a2e 5f9857f0
...@@ -586,6 +586,7 @@ browser and pasting the output. When that file changes, this one should be rege ...@@ -586,6 +586,7 @@ browser and pasting the output. When that file changes, this one should be rege
</script> </script>
<script aria-hidden="true" type="text/template" id="post-user-display-template"> <script aria-hidden="true" type="text/template" id="post-user-display-template">
<span class="username-wrapper">
<% if (username) { %> <% if (username) { %>
<a href="<%- user_url %>" class="username"><%- username %></a> <a href="<%- user_url %>" class="username"><%- username %></a>
<% if (is_community_ta) { %> <% if (is_community_ta) { %>
...@@ -596,5 +597,6 @@ browser and pasting the output. When that file changes, this one should be rege ...@@ -596,5 +597,6 @@ browser and pasting the output. When that file changes, this one should be rege
<% } else { %> <% } else { %>
anonymous anonymous
<% } %> <% } %>
</span>
</script> </script>
""") """)
...@@ -596,14 +596,16 @@ ${secondaryAction("delete", "remove", _("Delete"))} ...@@ -596,14 +596,16 @@ ${secondaryAction("delete", "remove", _("Delete"))}
</script> </script>
<script aria-hidden="true" type="text/template" id="post-user-display-template"> <script aria-hidden="true" type="text/template" id="post-user-display-template">
${"<% if (username) { %>"} <span class="username-wrapper">
<a href="${'<%- user_url %>'}" class="username">${'<%- username %>'}</a> ${"<% if (username) { %>"}
${"<% if (is_community_ta) { %>"} <a href="${'<%- user_url %>'}" class="username">${'<%- username %>'}</a>
<span class="user-label-community-ta">${_("Community TA")}</span> ${"<% if (is_community_ta) { %>"}
${"<% } else if (is_staff) { %>"} <span class="user-label-community-ta">${_("Community TA")}</span>
<span class="user-label-staff">${_("Staff")}</span> ${"<% } else if (is_staff) { %>"}
<span class="user-label-staff">${_("Staff")}</span>
${"<% } %>"}
${"<% } else { %>"}
${_('anonymous') | h}
${"<% } %>"} ${"<% } %>"}
${"<% } else { %>"} </span>
${_('anonymous') | h}
${"<% } %>"}
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment