177 |
02 Sep 06 |
peter |
1 |
#ifndef _theplu_svndigest_html_utility_ |
177 |
02 Sep 06 |
peter |
2 |
#define _theplu_svndigest_html_utility_ |
177 |
02 Sep 06 |
peter |
3 |
|
177 |
02 Sep 06 |
peter |
// $Id$ |
177 |
02 Sep 06 |
peter |
5 |
|
177 |
02 Sep 06 |
peter |
6 |
/* |
408 |
29 Jun 07 |
jari |
Copyright (C) 2006 Peter Johansson |
978 |
12 Dec 09 |
peter |
Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
1515 |
26 Sep 12 |
peter |
Copyright (C) 2009, 2010, 2012 Peter Johansson |
177 |
02 Sep 06 |
peter |
10 |
|
687 |
04 Aug 08 |
peter |
This file is part of svndigest, http://dev.thep.lu.se/svndigest |
177 |
02 Sep 06 |
peter |
12 |
|
177 |
02 Sep 06 |
peter |
svndigest is free software; you can redistribute it and/or modify it |
177 |
02 Sep 06 |
peter |
under the terms of the GNU General Public License as published by |
693 |
11 Sep 08 |
jari |
the Free Software Foundation; either version 3 of the License, or |
177 |
02 Sep 06 |
peter |
(at your option) any later version. |
177 |
02 Sep 06 |
peter |
17 |
|
177 |
02 Sep 06 |
peter |
svndigest is distributed in the hope that it will be useful, but |
177 |
02 Sep 06 |
peter |
WITHOUT ANY WARRANTY; without even the implied warranty of |
177 |
02 Sep 06 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
177 |
02 Sep 06 |
peter |
General Public License for more details. |
177 |
02 Sep 06 |
peter |
22 |
|
177 |
02 Sep 06 |
peter |
You should have received a copy of the GNU General Public License |
693 |
11 Sep 08 |
jari |
along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
177 |
02 Sep 06 |
peter |
25 |
*/ |
177 |
02 Sep 06 |
peter |
26 |
|
178 |
02 Sep 06 |
peter |
27 |
#include <fstream> |
177 |
02 Sep 06 |
peter |
28 |
#include <iosfwd> |
177 |
02 Sep 06 |
peter |
29 |
#include <string> |
201 |
09 Sep 06 |
peter |
30 |
#include <vector> |
177 |
02 Sep 06 |
peter |
31 |
|
643 |
31 May 08 |
peter |
32 |
#include <subversion-1/svn_types.h> |
643 |
31 May 08 |
peter |
33 |
|
177 |
02 Sep 06 |
peter |
34 |
namespace theplu{ |
177 |
02 Sep 06 |
peter |
35 |
namespace svndigest{ |
177 |
02 Sep 06 |
peter |
36 |
|
177 |
02 Sep 06 |
peter |
37 |
/// |
235 |
21 Apr 07 |
peter |
/// @brief create anchor |
177 |
02 Sep 06 |
peter |
39 |
/// |
376 |
20 Jun 07 |
jari |
/// @param url address to link to |
177 |
02 Sep 06 |
peter |
/// @param name text visible on page |
177 |
02 Sep 06 |
peter |
/// @param level '../' is added @a level times before @a href |
177 |
02 Sep 06 |
peter |
/// @param title title of anchor |
177 |
02 Sep 06 |
peter |
44 |
/// |
376 |
20 Jun 07 |
jari |
45 |
std::string anchor(const std::string& url, |
1513 |
23 Sep 12 |
peter |
46 |
const std::string& name, unsigned int level=0, |
498 |
14 Oct 07 |
peter |
47 |
const std::string& title="", |
498 |
14 Oct 07 |
peter |
48 |
const std::string& color=""); |
177 |
02 Sep 06 |
peter |
49 |
|
1005 |
03 Jan 10 |
peter |
50 |
/** |
1005 |
03 Jan 10 |
peter |
51 |
*/ |
1024 |
10 Jan 10 |
peter |
52 |
std::string image(const std::string& name); |
1005 |
03 Jan 10 |
peter |
53 |
|
178 |
02 Sep 06 |
peter |
54 |
/// |
376 |
20 Jun 07 |
jari |
/// @Brief print html footer of page |
200 |
09 Sep 06 |
peter |
56 |
/// |
200 |
09 Sep 06 |
peter |
57 |
void print_footer(std::ostream&); |
1513 |
23 Sep 12 |
peter |
58 |
|
200 |
09 Sep 06 |
peter |
59 |
/// |
199 |
09 Sep 06 |
peter |
/// @brief print html header of page |
199 |
09 Sep 06 |
peter |
61 |
/// |
234 |
09 Apr 07 |
peter |
/// \param os stream to print to |
234 |
09 Apr 07 |
peter |
/// \param name |
234 |
09 Apr 07 |
peter |
/// \param level |
546 |
04 Jan 08 |
peter |
/// \param user |
546 |
04 Jan 08 |
peter |
/// \param item total, code, comment, or other |
546 |
04 Jan 08 |
peter |
/// \param path current path |
546 |
04 Jan 08 |
peter |
/// \param stats which stats are we in |
1537 |
07 Oct 12 |
peter |
/// \param rev revision output page reflects |
1537 |
07 Oct 12 |
peter |
70 |
/// |
1513 |
23 Sep 12 |
peter |
71 |
void print_header(std::ostream& os, std::string name, unsigned int level, |
546 |
04 Jan 08 |
peter |
72 |
std::string user, std::string item, std::string path, |
1537 |
07 Oct 12 |
peter |
73 |
const std::string& stats, svn_revnum_t rev=0); |
199 |
09 Sep 06 |
peter |
74 |
|
199 |
09 Sep 06 |
peter |
75 |
|
750 |
12 Jan 09 |
peter |
76 |
/** |
750 |
12 Jan 09 |
peter |
\brief print html start |
750 |
12 Jan 09 |
peter |
78 |
|
750 |
12 Jan 09 |
peter |
Just like print_header, this function outputs start of html page, |
750 |
12 Jan 09 |
peter |
but in contrast to print_header there are no menus in the otput |
750 |
12 Jan 09 |
peter |
of this function. |
750 |
12 Jan 09 |
peter |
82 |
*/ |
1513 |
23 Sep 12 |
peter |
83 |
void print_html_start(std::ostream& os, const std::string& title, |
1537 |
07 Oct 12 |
peter |
84 |
unsigned int level, svn_revnum_t rev=0); |
750 |
12 Jan 09 |
peter |
85 |
|
750 |
12 Jan 09 |
peter |
86 |
|
274 |
02 May 07 |
peter |
87 |
/// |
274 |
02 May 07 |
peter |
/// @return if trac-revision is set in config file anchor to trac is |
274 |
02 May 07 |
peter |
/// given otherwise just a string corresponding to passed parameter. |
274 |
02 May 07 |
peter |
90 |
/// |
716 |
30 Nov 08 |
peter |
91 |
std::string trac_revision(svn_revnum_t, std::string color=""); |
274 |
02 May 07 |
peter |
92 |
|
177 |
02 Sep 06 |
peter |
93 |
}} // end of namespace svndigest end of namespace theplu |
177 |
02 Sep 06 |
peter |
94 |
|
1513 |
23 Sep 12 |
peter |
95 |
#endif |