Subversion Repositories RepoView

Rev

Rev 52 | Rev 54 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52 Rev 53
Line 1... Line 1...
1
/* $Id: modern.c 52 2024-08-22 06:01:32Z nishi $ */
1
/* $Id: modern.c 53 2024-08-22 06:03:12Z nishi $ */
2
 
2
 
3
#include "rv_query.h"
3
#include "rv_query.h"
4
 
4
 
5
#include "rv_util.h"
5
#include "rv_util.h"
6
#include "rv_version.h"
6
#include "rv_version.h"
Line 114... Line 114...
114
 
114
 
115
void list_repo(const char* name, const char* rev) {
115
void list_repo(const char* name, const char* rev) {
116
	char* showname = html_escape(name);
116
	char* showname = html_escape(name);
117
	char* urluser = url_escape(user);
117
	char* urluser = url_escape(user);
118
	char* urlrepo = url_escape(name);
118
	char* urlrepo = url_escape(name);
-
 
119
	add_data(&page, "<tr style=\"background-color: #");
-
 
120
	if((fcounter % 2) == 0) {
119
	add_data(&page, "<tr>");
121
		add_data(&page, "D2E1C0");
-
 
122
	} else {
-
 
123
		add_data(&page, "FFFFFF");
-
 
124
	}
-
 
125
	fcounter++;
120
	add_data(&page, "<td><a href=\"");
126
	add_data(&page, "\"><td><a href=\"");
121
	add_data(&page, INSTANCE_ROOT);
127
	add_data(&page, INSTANCE_ROOT);
122
	add_data(&page, "/?page=repo&reponame=");
128
	add_data(&page, "/?page=repo&reponame=");
123
	add_data(&page, urlrepo);
129
	add_data(&page, urlrepo);
124
	add_data(&page, "&username=");
130
	add_data(&page, "&username=");
125
	add_data(&page, urluser);
131
	add_data(&page, urluser);
Line 522... Line 528...
522
			add_data(&page, cbuf);
528
			add_data(&page, cbuf);
523
			add_data(&page, "</code>'.");
529
			add_data(&page, "</code>'.");
524
			add_data(&page, "</form>\n");
530
			add_data(&page, "</form>\n");
525
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
531
			add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
526
			add_data(&page, "<table border=\"0\">\n");
532
			add_data(&page, "<table border=\"0\">\n");
527
			add_data(&page, "<tr><th>Repository name</th><th>Revision</th></tr>\n");
533
			add_data(&page, "<tr style=\"background-color: #D2E1F6;\"><th>Repository name</th><th>Revision</th></tr>\n");
-
 
534
			fcounter = 0;
528
			rv_repo_list(user, list_repo);
535
			rv_repo_list(user, list_repo);
529
			add_data(&page, "</table>\n");
536
			add_data(&page, "</table>\n");
530
		}
537
		}
531
	} else if(strcmp(query, "createrepo") == 0) {
538
	} else if(strcmp(query, "createrepo") == 0) {
532
		title = rv_strdup("Creating Repository Result");
539
		title = rv_strdup("Creating Repository Result");
Line 814... Line 821...
814
 
821
 
815
				free(path);
822
				free(path);
816
 
823
 
817
				add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
824
				add_data(&page, "<h2 id=\"repolist\">Repository List</h2>\n");
818
				add_data(&page, "<table border=\"0\">\n");
825
				add_data(&page, "<table border=\"0\">\n");
819
				add_data(&page, "<tr><th>Repository name</th><th>Revision</th></tr>\n");
826
				add_data(&page, "<tr style=\"background-color: #D2E1F6;\"><th>Repository name</th><th>Revision</th></tr>\n");
-
 
827
				fcoutner = 0;
820
				rv_repo_list(rv_get_query("username"), list_repo);
828
				rv_repo_list(rv_get_query("username"), list_repo);
821
				add_data(&page, "</table>\n");
829
				add_data(&page, "</table>\n");
822
			} else {
830
			} else {
823
				add_data(&page, "User does not exist.\n");
831
				add_data(&page, "User does not exist.\n");
824
			}
832
			}