Browse Source

Merge branch 'master' of gitote.in:gitote/gitote

Yoginth 7 years ago
parent
commit
1764b4f817

+ 1 - 1
gitote.go

@@ -22,7 +22,7 @@ import (
 )
 
 // AppVer represents the version of Gitote
-const AppVer = "1.0.0-prod-rc.1"
+const AppVer = "1.0.0-prod-rc.2"
 
 func init() {
 	setting.AppVer = AppVer

+ 1 - 0
pkg/form/org.go

@@ -19,6 +19,7 @@ type UpdateOrgSetting struct {
 	Description     string `binding:"MaxSize(255)"`
 	Website         string `binding:"Url;MaxSize(100)"`
 	Location        string `binding:"MaxSize(50)"`
+	IsVerified      bool
 	MaxRepoCreation int
 }
 

+ 2 - 0
public/robots.txt

@@ -91,3 +91,5 @@ Disallow: /*/*/forks
 Disallow: /*/*/stars
 Disallow: /*/*/archive/
 Disallow: /*/*/raw/*
+
+Sitemap: https://gitote.in/sitemap.xml

+ 98 - 0
public/sitemap.xml

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+    <url>
+        <loc>https://gitote.in/</loc>
+        <changefreq>Daily</changefreq>
+        <priority>1.0</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/about</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/faq</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/privacy</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/tos</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/developers</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/brand</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/contribute</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/security</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/verified</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/makers</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/help</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/features</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/contact</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/request</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/sponsorship</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/user/login</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/user/sign_up</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+    <url>
+        <loc>https://gitote.in/trending</loc>
+        <changefreq>Daily</changefreq>
+        <priority>0.9</priority>
+    </url>
+</urlset>

+ 1 - 0
routes/org/setting.go

@@ -73,6 +73,7 @@ func SettingsPost(c *context.Context, f form.UpdateOrgSetting) {
 	org.Description = f.Description
 	org.Website = f.Website
 	org.Location = f.Location
+	org.IsVerified = f.IsVerified
 	if err := models.UpdateUser(org); err != nil {
 		c.Handle(500, "UpdateUser", err)
 		return

+ 1 - 0
routes/pages/pages.go

@@ -20,6 +20,7 @@ const (
 	FEATURES       = "pages/features"
 	FEATUREREQUEST = "pages/request"
 	SPONSORSHIP    = "pages/sponsorship"
+	SITEMAP        = "pages/sitemap"
 )
 
 func About(c *context.Context) {

+ 3 - 1
templates/org/header.tmpl

@@ -5,7 +5,9 @@
 				<div class="ui header">
 					<img class="ui image" src="{{.RelAvatarLink}}?s=100">
 					<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
-
+					{{if .IsVerified}}
+						<span style="padding:3px" class="ui green basic label tiny">Verified</span>
+					{{end}}
 					<div class="ui right">
 						<div class="ui menu">
 							<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">

+ 6 - 1
templates/org/home.tmpl

@@ -10,7 +10,9 @@
 				<div id="org-info">
 					<div class="ui header">
 						{{.Org.DisplayName}}
-						{{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="octicon octicon-gear"></span></a>{{end}}
+						{{if .Org.IsVerified}}
+							<span style="padding:3px" class="ui green basic label tiny">Verified</span>
+						{{end}}
 					</div>
 					{{if .Org.Description}}
 						<p class="desc">{{.Org.Description}}</p>
@@ -34,6 +36,9 @@
 			<div class="ui eleven wide column">
 				{{if .IsOrganizationOwner}}
 					<div class="text right">
+						{{if .IsOrganizationOwner}}
+							<a class="ui blue basic button" href="{{.OrgLink}}/settings"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "settings"}}</a>
+						{{end}}
 						<a class="ui green button" href="{{AppSubURL}}/repo/create?org={{.Org.ID}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
 					</div>
 					<div class="ui divider"></div>

+ 9 - 0
templates/org/settings/options.tmpl

@@ -41,6 +41,15 @@
 							<input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.Org.MaxRepoCreation}}">
 							<p class="help">(Set -1 to use global default limit)</p>
 						</div>
+						
+						<div class="ui divider"></div>
+
+						<div class="inline field">
+							<div class="ui checkbox">
+								<label><strong>This organization is verified</strong>  <span style="padding:3px" class="ui green basic label tiny">Verified</span></label>
+								<input name="is_verified" type="checkbox" {{if .Org.IsVerified}}checked{{end}}>
+							</div>
+						</div>
 						{{end}}
 
 						<div class="field">