Commit 6b15acb745cf7ef0ab43bfede9ca2d8e192a4081

Authored by Victor Costa
1 parent 8f0e4db1

Add article edit button

src/app/article/article.html
... ... @@ -4,6 +4,9 @@
4 4 </div>
5 5  
6 6 <div class="sub-header clearfix">
  7 + <a href="#" class="btn btn-default btn-xs" ui-sref="main.cmsEdit({profile: ctrl.profile.identifier, id: ctrl.article.id})">
  8 + <i class="fa fa-pencil-square-o fa-fw fa-lg"></i> {{"article.actions.edit" | translate}}
  9 + </a>
7 10 <div class="page-info pull-right small text-muted">
8 11 <span class="time">
9 12 <i class="fa fa-clock-o"></i> <span am-time-ago="ctrl.article.created_at | dateFormat"></span>
... ...
src/languages/en.json
... ... @@ -36,6 +36,7 @@
36 36 "comment.post.success.title": "Good job!",
37 37 "comment.post.success.message": "Comment saved!",
38 38 "comment.reply": "reply",
  39 + "article.actions.edit": "Edit",
39 40 "article.basic_editor.title": "Title",
40 41 "article.basic_editor.body": "Body",
41 42 "article.basic_editor.save": "Save",
... ...
src/languages/pt.json
... ... @@ -36,6 +36,7 @@
36 36 "comment.post.success.title": "Bom trabalho!",
37 37 "comment.post.success.message": "Comentário salvo com sucesso!",
38 38 "comment.reply": "responder",
  39 + "article.actions.edit": "Editar",
2
  • Me
    Michel Felipe @mfdeveloper

    Can be this key more generic? Something like: actions.edit only. This is not specific article action

    Choose File ...   File name...
    Cancel
  • 4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa @vfcosta

    Not sure...sometimes we want to change only this specific label to something like "Edit Article"

    Choose File ...   File name...
    Cancel
39 40 "article.basic_editor.title": "Título",
40 41 "article.basic_editor.body": "Corpo",
41 42 "article.basic_editor.save": "Salvar",
... ...