Quellcode durchsuchen

Remove Ads and Resolves #18

Yoginth vor 6 Jahren
Ursprung
Commit
a2244b1b06

+ 0 - 1
cmd/admin.go

@@ -143,7 +143,6 @@ func runCreateUser(c *cli.Context) error {
 		Passwd:     c.String("password"),
 		ThemeColor: "#161616",
 		IsActive:   true,
-		ShowAds:    true,
 		IsAdmin:    c.Bool("admin"),
 	}); err != nil {
 		raven.CaptureErrorAndWait(err, nil)

+ 0 - 1
conf/locale/locale_en-GB.ini

@@ -303,7 +303,6 @@ location = Location
 status = Status
 private_email = This email is Private
 beta = Enroll to Beta Member
-ads = Display Ads on dashboard
 update_profile = Update Profile
 update_profile_success = Your profile has been updated successfully.
 update_social = Update Social

+ 0 - 1
conf/locale/locale_en-US.ini

@@ -303,7 +303,6 @@ location = Location
 status = Status
 private_email = This email is Private
 beta = Enroll to Beta Member
-ads = Display Ads on dashboard
 update_profile = Update Profile
 update_profile_success = Your profile has been updated successfully.
 update_social = Update Social

+ 0 - 3
models/user.go

@@ -131,9 +131,6 @@ type User struct {
 
 	// For Admins
 	StaffNotes string
-
-	// Misc
-	ShowAds bool
 }
 
 // BeforeInsert will be invoked by XORM before inserting a record

+ 0 - 1
pkg/auth/auth.go

@@ -113,7 +113,6 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *models.User, isB
 							Name:     webAuthUser,
 							Email:    gouuid.NewV4().String() + "@localhost",
 							Passwd:   webAuthUser,
-							ShowAds:  true,
 							IsActive: true,
 						}
 						if err = models.CreateUser(u); err != nil {

+ 0 - 1
pkg/form/user.go

@@ -96,7 +96,6 @@ type UpdateProfile struct {
 	Status         string `binding:"MaxSize(25)"`
 	ThemeColor     string
 	IsBeta         bool
-	ShowAds        bool
 	PrivateEmail   bool
 	PrivateProfile bool
 }

+ 0 - 1
routes/admin/users.go

@@ -91,7 +91,6 @@ func NewUserPost(c *context.Context, f form.AdminCreateUser) {
 		Passwd:     f.Password,
 		ThemeColor: "#161616",
 		IsActive:   true,
-		ShowAds:    true,
 		LoginType:  models.LoginPlain,
 	}
 

+ 0 - 1
routes/user/auth.go

@@ -370,7 +370,6 @@ func SignUpPost(c *context.Context, cpt *captcha.Captcha, f form.Register) {
 		Email:      f.Email,
 		Passwd:     f.Password,
 		ThemeColor: "#161616",
-		ShowAds:    true,
 		IsActive:   !setting.Service.RegisterEmailConfirm,
 	}
 	if err := models.CreateUser(u); err != nil {

+ 0 - 2
routes/user/setting.go

@@ -92,7 +92,6 @@ func Settings(c *context.Context) {
 	c.Data["status"] = c.User.Status
 	c.Data["themecolor"] = c.User.ThemeColor
 	c.Data["is_beta"] = c.User.IsBeta
-	c.Data["show_ads"] = c.User.ShowAds
 	c.Data["private_email"] = c.User.PrivateEmail
 	c.Data["private_profile"] = c.User.PrivateProfile
 	c.Success(SettingsProfileTPL)
@@ -161,7 +160,6 @@ func SettingsPost(c *context.Context, f form.UpdateProfile) {
 	c.User.Status = f.Status
 	c.User.ThemeColor = f.ThemeColor
 	c.User.IsBeta = f.IsBeta
-	c.User.ShowAds = f.ShowAds
 	c.User.PrivateEmail = f.PrivateEmail
 	c.User.PrivateProfile = f.PrivateProfile
 

+ 0 - 7
templates/user/settings/profile.tmpl

@@ -57,13 +57,6 @@
 							<label for="theme_color">Color</label>
 							<input type="text" id="theme_color" name="theme_color" class="jscolor {hash:true} jscolor-active" value="{{.themecolor}}" placeholder="#161616" autocomplete="off">
 						</div>
-						<div class="inline field">
-							<label for="location">Ads: </label>
-							<div class="ui checkbox">
-								<label><strong>{{.i18n.Tr "settings.ads"}}</strong></label>
-								<input name="show_ads" type="checkbox" {{if .show_ads}}checked{{end}}>
-							</div>
-						</div>
 						<div class="inline field">
 							<label for="location">Beta: </label>
 							<div class="ui checkbox">