cnpmjs.org
Version:
Private npm registry and web for Enterprise, base on MySQL and Simple Store Service
69 lines (67 loc) • 2.07 kB
HTML
<style>
#profile .package {
padding: 10px;
font-size: 18px;
border-bottom: 1px solid #ddd;
}
</style>
<div id="profile">
<h1>
Packages by
<% if (user.json.homepage) { %>
<span class="user">
<a class="username" target="_blank" href="<%= user.json.homepage %>">
<% if (user.json.avatar) { %>
<img src="<%= user.json.avatar %>" class="avatar">
<% } %>
<%= user.name %>
</a>
</span>
<% } else { %>
<span style="color:#09f;"><%= user.name %></span>
<% } %>
<% if (user.json.fullname) { %>
<small>(<%= user.json.fullname %>)</small>
<% } %>
<% if (user.email) { %>
<small>(<a href="mailto:<%= user.email %>"><%= user.email %></a>)</small>
<% } %>
<small>(<a href="/sync/user:<%= user.name %>" target="_blank">SYNC</a> profile)</small>
</h1>
<table class="downloads">
<tbody>
<tr>
<th>Name</th>
<th>IM</th>
<th>Last modified</th>
<th>Is admin</th>
<th>Publish scopes</th>
</tr>
<tr>
<td>@<%= user.json.fullname || user.name %></td>
<td>
<% if (user.json.im) { %>
<a href="<%= user.json.im %>" target="_blank"><span class="glyphicon glyphicon-comment"></span></a>
<% } %>
</td>
<td><%- lastModified %></td>
<td><%- isAdmin %></td>
<td>
<%- scopes.map(function (scope) {
return '<a href="/browse/keyword/' + scope + '" target="_blank">' + scope + '</a>';
}).join(' , ') %>
</td>
</tr>
</tbody>
</table>
<hr />
<% if (!packages.length) { %>
<div class="alert alert-warning">Can not found any package by <%= user.name %>.</div>
<% } %>
<% for (var i = 0; i < packages.length; i++) { %>
<div class="package">
<a href="/package/<%= packages[i].name %>" class="package-name"><%= packages[i].name %></a>
<span class="package-description"><%= packages[i].description %></span>
</div>
<% } %>
</div>