diff --git a/services/web/app/views/project/editor/history.pug b/services/web/app/views/project/editor/history.pug
index bdc834352f..ba7740c199 100644
--- a/services/web/app/views/project/editor/history.pug
+++ b/services/web/app/views/project/editor/history.pug
@@ -135,12 +135,17 @@ div#history(ng-show="ui.view == 'history'")
div.description(ng-click="select()")
div.time {{ update.meta.end_ts | formatDate:'h:mm a' }}
div.docs(ng-repeat="pathname in update.pathnames")
+ i.fa.fa-pencil(ng-if="history.isV2")
span.doc {{ pathname }}
div.docs(ng-repeat="project_op in update.project_ops")
span(ng-if="project_op.rename")
- | Renamed {{ project_op.rename.pathname }} to {{ project_op.rename.newPathname }}
+ span Renamed
+ span.doc {{ project_op.rename.pathname }}
+ span to
+ span.doc {{ project_op.rename.newPathname }}
span(ng-if="project_op.add")
- | Added {{ project_op.add.pathname }}
+ span Added
+ span.doc {{ project_op.add.pathname }}
div.users
div.user(ng-repeat="update_user in update.meta.users")
.color-square(ng-if="update_user != null", ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}")
@@ -170,8 +175,8 @@ div#history(ng-show="ui.view == 'history'")
'other': 'changes'\
}"
)
- | in {{history.diff.doc.name}}
- .toolbar-right
+ | in {{history.diff.pathname}}
+ .toolbar-right(ng-if="!history.isV2")
a.btn.btn-danger.btn-sm(
href,
ng-click="openRestoreDiffModal()"
diff --git a/services/web/public/coffee/ide/history/HistoryManager.coffee b/services/web/public/coffee/ide/history/HistoryManager.coffee
index b2ecc8c8ef..f896fbb8b4 100644
--- a/services/web/public/coffee/ide/history/HistoryManager.coffee
+++ b/services/web/public/coffee/ide/history/HistoryManager.coffee
@@ -100,6 +100,7 @@ define [
end_ts: end_ts
doc: doc
error: false
+ pathname: doc.name
}
if !doc.deleted
diff --git a/services/web/public/coffee/ide/history/HistoryV2Manager.coffee b/services/web/public/coffee/ide/history/HistoryV2Manager.coffee
index d7e80d5153..01c9a6ad2d 100644
--- a/services/web/public/coffee/ide/history/HistoryV2Manager.coffee
+++ b/services/web/public/coffee/ide/history/HistoryV2Manager.coffee
@@ -37,6 +37,7 @@ define [
reset: () ->
@$scope.history = {
+ isV2: true
updates: []
nextBeforeTimestamp: null
atEnd: false
@@ -129,14 +130,6 @@ define [
diff.restoreDeletedSuccess = false
diff.restoredDocNewId = null
- restoreDeletedDoc: (doc) ->
- url = "/project/#{@$scope.project_id}/doc/#{doc.id}/restore"
- @ide.$http.post(url, name: doc.name, _csrf: window.csrfToken)
-
- restoreDiff: (diff) ->
- url = "/project/#{@$scope.project_id}/doc/#{diff.doc.id}/version/#{diff.fromV}/restore"
- @ide.$http.post(url, _csrf: window.csrfToken)
-
_parseDiff: (diff) ->
row = 0
column = 0
diff --git a/services/web/public/stylesheets/app/editor/history.less b/services/web/public/stylesheets/app/editor/history.less
index b6dca4b7cc..558f460e3c 100644
--- a/services/web/public/stylesheets/app/editor/history.less
+++ b/services/web/public/stylesheets/app/editor/history.less
@@ -169,10 +169,20 @@
font-size: 0.8rem;
line-height: @line-height-computed;
}
- .docs {
- font-weight: bold;
+ .action {
font-size: 0.9rem;
}
+ .docs {
+ font-size: 0.9rem;
+ .doc {
+ font-weight: bold;
+ }
+ i {
+ font-size: 0.8rem;
+ color: @gray;
+ margin-right: 4px;
+ }
+ }
}
li.loading-changes, li.empty-message {
padding: 6px;
diff --git a/services/web/test/unit_frontend/coffee/HistoryManagerV2Tests.coffee b/services/web/test/unit_frontend/coffee/HistoryManagerV2Tests.coffee
index 4517fc16dd..19b5156b1b 100644
--- a/services/web/test/unit_frontend/coffee/HistoryManagerV2Tests.coffee
+++ b/services/web/test/unit_frontend/coffee/HistoryManagerV2Tests.coffee
@@ -21,6 +21,7 @@ describe "HistoryV2Manager", ->
it "should setup the history scope on intialization", ->
expect(@scope.history).to.deep.equal({
+ isV2: true
updates: []
nextBeforeTimestamp: null
atEnd: false