summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/column_rank.cpp
blob: 140ae94adcf208d075a1b2265f3de45d4309d2a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "stdafx.h"
#include "column_rank.h"

/*
 * ColRank
 */

void ColRank::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const
{
	if (row == 1)
		writeRowspanTD(tos, getCustomTitle(TranslateT("Rank"), TranslateT("Rank")), row, 1, rowSpan);
}

void ColRank::impl_outputBegin()
{
	m_nNextRank = 1;
}

void ColRank::impl_outputRenderRow(ext::ostream& tos, const Contact&, DisplayType display)
{
	if (display == asContact)
		tos << _T("<td class=\"num\">")
			<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{rank}.")) % _T("#{rank}") * (m_nNextRank++)))
			<< _T("</td>") << ext::endl;
	else 
		tos << _T("<td>&nbsp;</td>");
}