Skip to content

Commit

Permalink
修改文案
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbbbbbbbbbbba committed Jul 1, 2019
1 parent 996ba2c commit d43f338
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions controllers/topic_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (this *TopicController) GetCreate() {
return
}
render.View(this.Ctx, "topic/create.html", iris.Map{
utils.GlobalFieldSiteTitle: "发起讨论",
utils.GlobalFieldSiteTitle: "发表主题",
})
return
}
Expand Down Expand Up @@ -131,7 +131,7 @@ func (this *TopicController) PostFavoriteBy(topicId int64) *simple.JsonResult {
return simple.Success()
}

// 帖子列表
// 主题列表
func GetTopics(ctx context.Context) {
page := ctx.Params().GetIntDefault("page", 1)

Expand All @@ -140,7 +140,7 @@ func GetTopics(ctx context.Context) {
Page(page, 20).Desc("last_comment_time"))

render.View(ctx, "topic/index.html", iris.Map{
utils.GlobalFieldSiteTitle: "讨论",
utils.GlobalFieldSiteTitle: "主题",
"Topics": render.BuildTopics(topics),
"Page": paging,
"PrePageUrl": utils.BuildTopicsUrl(page - 1),
Expand Down
2 changes: 1 addition & 1 deletion controllers/user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func GetUserMessages(ctx context.Context) {
})
}

// 用户中心 - 帖子列表
// 用户中心 - 主题列表
func GetUserTopics(ctx context.Context) {
userId := ctx.Params().GetInt64Default("userId", 0)
page := ctx.Params().GetIntDefault("page", 1)
Expand Down
6 changes: 3 additions & 3 deletions model/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ type ArticleShare struct {
CreateTime int64 `json:"createTime" form:"createTime"` // 创建时间
}

// 帖子
// 主题
type Topic struct {
Model
UserId int64 `gorm:"not null" json:"userId" form:"userId"` // 用户
Expand All @@ -177,10 +177,10 @@ type Topic struct {
CreateTime int64 `json:"createTime" form:"createTime"` // 创建时间
}

// 帖子标签
// 主题标签
type TopicTag struct {
Model
TopicId int64 `gorm:"not null" json:"topicId" form:"topicId"` // 帖子编号
TopicId int64 `gorm:"not null" json:"topicId" form:"topicId"` // 主题编号
TagId int64 `gorm:"not null" json:"tagId" form:"tagId"` // 标签编号
CreateTime int64 `json:"createTime" form:"createTime"` // 创建时间
}
Expand Down
2 changes: 1 addition & 1 deletion services/favorite_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (this *FavoriteService) AddArticleFavorite(userId, articleId int64) error {
})
}

// 收藏帖子
// 收藏主题
func (this *FavoriteService) AddTopicFavorite(userId, topicId int64) error {
topic := this.TopicRepository.Get(simple.GetDB(), topicId)
if topic == nil || topic.Status != model.TopicStatusOk {
Expand Down
2 changes: 1 addition & 1 deletion services/message_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (this *MessageService) SendCommentMsg(comment *model.Comment) {
topic := this.TopicRepository.Get(simple.GetDB(), comment.EntityId)
if topic != nil && topic.UserId != comment.UserId {
userId = topic.UserId
msgContent = commentUser.Nickname + " 回复了你的讨论:" + commentSummary
msgContent = commentUser.Nickname + " 回复了你的主题:" + commentSummary
msgQuoteContent = "《" + topic.Title + "》"
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/topic_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (this *TopicService) Edit(topicId int64, tags []string, title, content stri
return simple.NewError2(err)
}

// 帖子标签
// 主题标签
func (this *TopicService) GetTopicTags(topicId int64) []model.Tag {
topicTags, err := this.TopicTagRepository.QueryCnd(simple.GetDB(), simple.NewQueryCnd("topic_id = ?", topicId))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion utils/internal_urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func BuildTopicsUrl(page int) string {
return BuildAbsUrl("/topics")
}

// 用户帖子列表
// 用户主题列表
func BuildUserTopicsUrl(userId int64, page int) string {
path := "/user/" + strconv.FormatInt(userId, 10) + "/topics"
if page > 1 {
Expand Down
8 changes: 4 additions & 4 deletions web/views/common/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="navbar-start">
<a class="navbar-item" href="{{baseUrl}}">首页</a>
<a class="navbar-item" href="{{baseUrl}}/articles">文章</a>
<a class="navbar-item" href="{{baseUrl}}/topics">讨论</a>
<a class="navbar-item" href="{{baseUrl}}/topics">主题</a>
</div>


Expand All @@ -34,15 +34,15 @@
<div class="buttons">
{{/*<a class="button is-success" href="{{baseUrl}}/article/create"><strong>发表文章</strong></a>*/}}
<a class="button is-success" href="{{baseUrl}}/topic/create"><i
class="iconfont icon-topic"></i>&nbsp;<strong>讨论</strong></a>
class="iconfont icon-topic"></i>&nbsp;<strong>发帖</strong></a>
</div>
</div>
{{/*
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link"><strong>发表</strong></a>
<div class="navbar-dropdown">
<a class="navbar-item" href="{{baseUrl}}/article/create">发表文章</a>
<a class="navbar-item" href="{{baseUrl}}/topic/create">发表讨论</a>
<a class="navbar-item" href="{{baseUrl}}/topic/create">发表主题</a>
</div>
</div>
*/}}
Expand All @@ -55,7 +55,7 @@
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="{{baseUrl}}/topic/create"><i
class="iconfont icon-topic"></i>&nbsp;发表讨论</a>
class="iconfont icon-topic"></i>&nbsp;发表主题</a>
<a class="navbar-item" href="{{baseUrl}}/article/create"><i
class="iconfont icon-publish"></i>&nbsp;发表文章</a>
<a class="navbar-item" href="{{baseUrl}}/user/{{.CurrentUser.Id}}/messages"><i
Expand Down
6 changes: 3 additions & 3 deletions web/views/topic/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ul>
<li><a href="{{baseUrl}}">首页</a></li>
<li><a href="{{baseUrl}}/user/{{.CurrentUser.Id}}">{{.CurrentUser.Nickname}}</a></li>
<li class="is-active"><a href="#" aria-current="page">讨论</a></li>
<li class="is-active"><a href="#" aria-current="page">主题</a></li>
</ul>
</nav>
</div>
Expand Down Expand Up @@ -54,7 +54,7 @@

<div class="field is-grouped">
<div class="control">
<a class="button is-success" id="topicCreateSubmit">发表讨论</a>
<a class="button is-success" id="topicCreateSubmit">发表主题</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@
height: 400,
toolbar: ['emoji', 'headings', 'bold', 'italic', 'strike', '|', 'line', 'quote', 'list', 'ordered-list', 'check', 'code',
'inline-code', 'undo', 'redo', 'upload', 'link', 'table', 'preview', 'fullscreen'],
placeholder: '讨论内容(可为空)',
placeholder: '主题内容(可为空)',
upload: {
accept: 'image/*',
token: 'test',
Expand Down
4 changes: 2 additions & 2 deletions web/views/topic/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ul>
<li><a href="{{baseUrl}}">首页</a></li>
<li><a href="{{baseUrl}}/user/{{.CurrentUser.Id}}?tab=topics">{{.CurrentUser.Nickname}}</a></li>
<li class="is-active"><a href="#" aria-current="page">讨论</a></li>
<li class="is-active"><a href="#" aria-current="page">主题</a></li>
</ul>
</nav>
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@
height: 400,
toolbar: ['emoji', 'headings', 'bold', 'italic', 'strike', '|', 'line', 'quote', 'list', 'ordered-list', 'check', 'code',
'inline-code', 'undo', 'redo', 'upload', 'link', 'table', 'preview', 'fullscreen'],
placeholder: '讨论内容(可为空)',
placeholder: '主题内容(可为空)',
upload: {
accept: 'image/*',
token: 'test',
Expand Down
2 changes: 1 addition & 1 deletion web/views/topic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="widget">
<div class="content">
<a class="button is-success" href="{{baseUrl}}/topic/create"><i
class="iconfont icon-topic"></i>&nbsp;<strong>发表讨论</strong></a>
class="iconfont icon-topic"></i>&nbsp;<strong>发表主题</strong></a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion web/views/user/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<a href="{{baseUrl}}/user/{{.User.Id}}?tab=topics">
<span class="icon is-small"><i class="iconfont icon-topic"
aria-hidden="true"></i></span>
<span>讨论</span>
<span>主题</span>
</a>
</li>
{{if .CurrentUser}}
Expand Down

0 comments on commit d43f338

Please sign in to comment.