sharkey-web 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.md +19 -0
  5. data/README.md +188 -0
  6. data/Rakefile +8 -0
  7. data/bin/sharkey-web +9 -0
  8. data/config.ru +3 -0
  9. data/lib/sharkey.rb +12 -0
  10. data/lib/sharkey/app.rb +526 -0
  11. data/lib/sharkey/importerexporter.rb +79 -0
  12. data/lib/sharkey/models.rb +295 -0
  13. data/lib/sharkey/public/css/loading.gif +0 -0
  14. data/lib/sharkey/public/css/magicsuggest.css +232 -0
  15. data/lib/sharkey/public/css/nprogress.css +74 -0
  16. data/lib/sharkey/public/css/styles.css +263 -0
  17. data/lib/sharkey/public/css/ui.fancytree.css +545 -0
  18. data/lib/sharkey/public/data/sentences.txt +5 -0
  19. data/lib/sharkey/public/fonts/Quadrata.eot +0 -0
  20. data/lib/sharkey/public/fonts/Quadrata.svg +613 -0
  21. data/lib/sharkey/public/fonts/Quadrata.ttf +0 -0
  22. data/lib/sharkey/public/fonts/Quadrata.woff +0 -0
  23. data/lib/sharkey/public/fonts/Quadrata.zip +0 -0
  24. data/lib/sharkey/public/images/loader.gif +0 -0
  25. data/lib/sharkey/public/images/sharkey-logo.png +0 -0
  26. data/lib/sharkey/public/images/sharkey.png +0 -0
  27. data/lib/sharkey/public/js/ajaxmanager.js +67 -0
  28. data/lib/sharkey/public/js/keybindings.js +92 -0
  29. data/lib/sharkey/public/js/lib/bootstrap.min.js +6 -0
  30. data/lib/sharkey/public/js/lib/jquery-1.9.1.min.js +5 -0
  31. data/lib/sharkey/public/js/lib/jquery-ui.js +16150 -0
  32. data/lib/sharkey/public/js/lib/jquery.bootstrap-autohidingnavbar.js +213 -0
  33. data/lib/sharkey/public/js/lib/jquery.fancytree-all.js +6424 -0
  34. data/lib/sharkey/public/js/lib/jquery.tagcloud.js +92 -0
  35. data/lib/sharkey/public/js/lib/magicsuggest.js +1468 -0
  36. data/lib/sharkey/public/js/lib/mousetrap.min.js +9 -0
  37. data/lib/sharkey/public/js/lib/nprogress.js +476 -0
  38. data/lib/sharkey/public/js/page-add-link-autofill.js +102 -0
  39. data/lib/sharkey/public/js/page-add-link.js +156 -0
  40. data/lib/sharkey/public/js/page-categories.js +348 -0
  41. data/lib/sharkey/public/js/page-edit-link.js +103 -0
  42. data/lib/sharkey/public/js/page-links.js +54 -0
  43. data/lib/sharkey/public/js/page-settings.js +93 -0
  44. data/lib/sharkey/public/js/page-tagcloud.js +35 -0
  45. data/lib/sharkey/public/js/page-tags.js +287 -0
  46. data/lib/sharkey/public/js/scripts.js +147 -0
  47. data/lib/sharkey/public/themes/amelia/style.css +7 -0
  48. data/lib/sharkey/public/themes/bootstrap/style.css +5785 -0
  49. data/lib/sharkey/public/themes/cerulean/style.css +7 -0
  50. data/lib/sharkey/public/themes/cosmo/style.css +7 -0
  51. data/lib/sharkey/public/themes/cyborg/style.css +7 -0
  52. data/lib/sharkey/public/themes/darkly/style.css +7 -0
  53. data/lib/sharkey/public/themes/facebook-like/README.md +6 -0
  54. data/lib/sharkey/public/themes/facebook-like/style.css +6085 -0
  55. data/lib/sharkey/public/themes/flatly/style.css +7 -0
  56. data/lib/sharkey/public/themes/fonts/glyphicons-halflings-regular.eot +0 -0
  57. data/lib/sharkey/public/themes/fonts/glyphicons-halflings-regular.svg +229 -0
  58. data/lib/sharkey/public/themes/fonts/glyphicons-halflings-regular.ttf +0 -0
  59. data/lib/sharkey/public/themes/fonts/glyphicons-halflings-regular.woff +0 -0
  60. data/lib/sharkey/public/themes/holo-like/README.md +5 -0
  61. data/lib/sharkey/public/themes/holo-like/style.css +5997 -0
  62. data/lib/sharkey/public/themes/journal/style.css +7 -0
  63. data/lib/sharkey/public/themes/lumen/style.css +7 -0
  64. data/lib/sharkey/public/themes/readable/style.css +7 -0
  65. data/lib/sharkey/public/themes/simplex/style.css +7 -0
  66. data/lib/sharkey/public/themes/slate/style.css +7 -0
  67. data/lib/sharkey/public/themes/spacelab/style.css +7 -0
  68. data/lib/sharkey/public/themes/superhero/style.css +7 -0
  69. data/lib/sharkey/public/themes/united/style.css +7 -0
  70. data/lib/sharkey/public/themes/yeti/style.css +7 -0
  71. data/lib/sharkey/setting.rb +74 -0
  72. data/lib/sharkey/version.rb +5 -0
  73. data/lib/sharkey/views/404.slim +4 -0
  74. data/lib/sharkey/views/about.slim +7 -0
  75. data/lib/sharkey/views/add_link.slim +157 -0
  76. data/lib/sharkey/views/categories.slim +101 -0
  77. data/lib/sharkey/views/category.slim +22 -0
  78. data/lib/sharkey/views/centered.slim +49 -0
  79. data/lib/sharkey/views/dashboard.slim +107 -0
  80. data/lib/sharkey/views/dashboard_index.slim +26 -0
  81. data/lib/sharkey/views/edit_link.slim +121 -0
  82. data/lib/sharkey/views/help.slim +74 -0
  83. data/lib/sharkey/views/keybindings.slim +58 -0
  84. data/lib/sharkey/views/link.slim +30 -0
  85. data/lib/sharkey/views/links.slim +22 -0
  86. data/lib/sharkey/views/navbar.slim +68 -0
  87. data/lib/sharkey/views/settings.slim +74 -0
  88. data/lib/sharkey/views/settings_index.slim +220 -0
  89. data/lib/sharkey/views/single_category.slim +37 -0
  90. data/lib/sharkey/views/single_link.slim +95 -0
  91. data/lib/sharkey/views/single_tag.slim +33 -0
  92. data/lib/sharkey/views/tag.slim +22 -0
  93. data/lib/sharkey/views/tagcloud.slim +54 -0
  94. data/lib/sharkey/views/tags.slim +99 -0
  95. data/sharkey-web.gemspec +44 -0
  96. metadata +324 -0
@@ -0,0 +1,22 @@
1
+ / Lists all links
2
+
3
+ h1.page-header Links
4
+
5
+ p Page with everything about your links
6
+
7
+ h2.sub-header All Links
8
+
9
+ p Here's a list of all links.
10
+
11
+ ul.links.list-group
12
+ - if @links.empty?
13
+ li.list-group-item
14
+ | You have no links!
15
+
16
+ - else
17
+ - @links.each do |the_link|
18
+ == slim(:single_link, locals: { link: the_link })
19
+
20
+
21
+ script src="/js/page-links.js"
22
+
@@ -0,0 +1,68 @@
1
+ /
2
+ Top navigation bar
3
+
4
+ .navbar.navbar-inverse.navbar-fixed-top#the-navbar role="navigation"
5
+ .container-fluid
6
+ .navbar-header
7
+ button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-collapse"
8
+ span.sr-only Toggle navigation
9
+ span.icon-bar
10
+ span.icon-bar
11
+ span.icon-bar
12
+ a.navbar-brand href="/" Sharkey
13
+
14
+ .collapse.navbar-collapse
15
+ ul.nav.navbar-nav.navbar-left
16
+ li
17
+ a href="#" data-toggle="modal" data-target="#add-link"
18
+ span.glyphicon.glyphicon-plus-sign
19
+ '
20
+ | Add Link
21
+
22
+ form.navbar-form.navbar-left
23
+ .input-group.input-group-sm
24
+ input.form-control type="text" placeholder="Search" name="search"
25
+ .input-group-btn
26
+ button.btn.btn-default tyle="submit"
27
+ span.glyphicon.glyphicon-search
28
+
29
+ ul.nav.navbar-nav.navbar-right
30
+
31
+ li class="#{ if page == 'home' then 'active' end }"
32
+ a#keybind-home href="/"
33
+ span.glyphicon.glyphicon-dashboard
34
+ '
35
+ | Dashboard
36
+
37
+ li class="#{ if page == 'settings' then 'active' end }"
38
+ a#keybind-settings href="/settings"
39
+ span.glyphicon.glyphicon-cog
40
+ '
41
+ |Settings
42
+
43
+ li class="#{ if page == 'help' then 'active' end }"
44
+ a#keybind-help href="/help"
45
+ span.glyphicon.glyphicon-question-sign
46
+ '
47
+ | Help
48
+ li class="#{ if page == 'about' then 'active' end }"
49
+ a#keybind-about href="/about"
50
+ span.glyphicon.glyphicon-info-sign
51
+ '
52
+ | About
53
+
54
+ script src="/js/lib/mousetrap.min.js"
55
+ script src="/js/keybindings.js"
56
+ == slim(:keybindings)
57
+
58
+ script src="/js/lib/jquery.bootstrap-autohidingnavbar.js"
59
+
60
+ script src="/js/lib/magicsuggest.js"
61
+ script src="/js/page-add-link.js"
62
+ - if Sharkey::Setting['auto_fill'] == 'true'
63
+ script src="/js/page-add-link-autofill.js"
64
+ == slim(:add_link)
65
+
66
+ script src="/js/page-edit-link.js"
67
+ == slim(:edit_link)
68
+
@@ -0,0 +1,74 @@
1
+ /
2
+ Layout for the settings page
3
+
4
+ doctype html
5
+ html
6
+ head
7
+ meta charset="utf-8"
8
+
9
+ /!
10
+ .
11
+ mmm mmm m mm m m mmmmm mmm m mm
12
+ # ' ' # #' ' # # # # # ' # #' #
13
+ '''m m'''# # # # # # # m'''# # #
14
+ 'mmm' 'mm'# # 'mm'# # # # 'mm'# # #
15
+ sharkey link: the best thing since Delicious
16
+ .
17
+
18
+ title Sharkey Link
19
+
20
+ / Poor Man's Theme Support
21
+ link rel="stylesheet" media="screen, projection" href="/themes/#{Sharkey::Setting['theme']}/style.css"
22
+
23
+ - if Sharkey::Setting['loading_bar'] == 'true'
24
+ link rel="stylesheet" href="/css/nprogress.css"
25
+
26
+ link rel="stylesheet" href="/css/magicsuggest.css"
27
+
28
+ link rel="stylesheet" media="screen, projection" href="/css/styles.css"
29
+
30
+ /[if lt IE 9]
31
+ script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"
32
+
33
+ script src="/js/lib/jquery-1.9.1.min.js"
34
+ script src="/js/lib/jquery-ui.js"
35
+
36
+ script src="/js/lib/bootstrap.min.js"
37
+
38
+ - if Sharkey::Setting['loading_bar'] == 'true'
39
+ script src="/js/lib/nprogress.js"
40
+
41
+ script src="/js/page-settings.js"
42
+ script src="/js/scripts.js"
43
+
44
+ body data-spy="scroll" data-target="#the-sidebar"
45
+ == slim(:navbar, locals: { page: page })
46
+
47
+ .container-fluid
48
+ .row
49
+
50
+ / The sidebar
51
+ .col-sm-3.col-md-2.sidebar#the-sidebar
52
+ ul.nav.nav-sidebar
53
+ li
54
+ a href="#general"
55
+ span> class="glyphicon glyphicon-wrench"
56
+ | General
57
+ li
58
+ a href="#appearance"
59
+ span> class="glyphicon glyphicon-tasks"
60
+ | Appearance
61
+ li
62
+ a href="#data"
63
+ span> class="glyphicon glyphicon-file"
64
+ | Data
65
+ li
66
+ a href="#erase-stuff"
67
+ span> class="glyphicon glyphicon-fire"
68
+ | Erase Stuff
69
+
70
+ / The actual content
71
+ .col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2.main
72
+ == yield
73
+
74
+
@@ -0,0 +1,220 @@
1
+ h1.page-header Settings
2
+
3
+ p Configure all your stuff here
4
+
5
+ h2.sub-header#general General Settings
6
+
7
+ .row.setting
8
+ .col-md-12
9
+ h4 Auto-fill Link Info
10
+ .row
11
+ .col-md-8
12
+ p.help-block
13
+ | Automatically try to fill the link's information at the "Add Link" dialog.
14
+ p.help-block
15
+ | Tip: it stops when you start typing.
16
+
17
+ .col-md-4
18
+ form role="form" action="/setting" method="POST"
19
+ .btn-group data-toggle="buttons"
20
+
21
+ - if Sharkey::Setting['auto_fill'] == 'true'
22
+ label.btn.btn-primary.ajax-radio.active
23
+ input type="radio" name="auto_fill" value="true" checked="true"
24
+ | On
25
+ label.btn.btn-default.ajax-radio
26
+ input type="radio" name="auto_fill" value="false" checked="false"
27
+ | Off
28
+ - else
29
+ label.btn.btn-default.ajax-radio
30
+ input type="radio" name="auto_fill" value="true" checked="false"
31
+ | On
32
+ label.btn.btn-primary.ajax-radio.active
33
+ input type="radio" name="auto_fill" value="false" checked="true"
34
+ | Off
35
+
36
+ h2.sub-header#appearance Appearance
37
+
38
+ .row.setting
39
+ .col-md-12
40
+ h4 Theme
41
+ .row
42
+ .col-md-8
43
+ p.help-block
44
+ | Change how it looks!
45
+ p.help-block
46
+ | Courtesy of
47
+ a< href="http://bootswatch.com/" Bootswatch.
48
+
49
+ .col-md-4
50
+ form#theme-form role="form" action="/setting" method="POST"
51
+ .form-group
52
+ select.form-control#theme-select name="theme" placeholder="Theme"
53
+ - Dir.entries(File.expand_path('./lib/sharkey/public/themes')).sort.each do |dir|
54
+ - if (dir != 'fonts') and (dir[0] != '.')
55
+ - if dir == Sharkey::Setting['theme']
56
+ option value="#{dir}" selected="true" = dir
57
+ - else
58
+ option value="#{dir}" = dir
59
+
60
+ button.btn.btn-primary type="submit" title="Apply"
61
+ span> class="glyphicon glyphicon-picture"
62
+ | Apply
63
+
64
+ .row.setting
65
+ .col-md-12
66
+ h4 Date format
67
+ .row
68
+ .col-md-8
69
+ p.help-block
70
+ | How the date will get shown besides Links and Tags.
71
+ p.help-block
72
+ | Relative date (e.g. '8 hours ago') or full date
73
+ format (18:05 22-12-2014).
74
+
75
+ .col-md-4
76
+ form role="form" action="/setting" method="POST"
77
+ .btn-group data-toggle="buttons"
78
+
79
+ - if Sharkey::Setting['date_format'] == 'relative'
80
+ label.btn.btn-primary.ajax-radio.active
81
+ input type="radio" name="date_format" value="relative" checked="true"
82
+ | Relative Date
83
+ label.btn.btn-default.ajax-radio
84
+ input type="radio" name="date_format" value="full" checked="false"
85
+ | Full Date
86
+ - else
87
+ label.btn.btn-default.ajax-radio
88
+ input type="radio" name="date_format" value="relative" checked="false"
89
+ | Relative Date
90
+ label.btn.btn-primary.ajax-radio.active
91
+ input type="radio" name="date_format" value="full" checked="true"
92
+ | Full Date
93
+
94
+
95
+ .row.setting
96
+ .col-md-12
97
+ h4 Loading bar
98
+ .row
99
+ .col-md-8
100
+ p.help-block
101
+ | Show progress bar when loading the page
102
+
103
+ .col-md-4
104
+ form role="form" action="/setting" method="POST"
105
+ .btn-group data-toggle="buttons"
106
+
107
+ - if Sharkey::Setting['loading_bar'] == 'true'
108
+ label.btn.btn-primary.ajax-radio.active
109
+ input type="radio" name="loading_bar" value="true" checked="true"
110
+ | On
111
+ label.btn.btn-default.ajax-radio
112
+ input type="radio" name="loading_bar" value="false" checked="false"
113
+ | Off
114
+ - else
115
+ label.btn.btn-default.ajax-radio
116
+ input type="radio" name="loading_bar" value="true" checked="false"
117
+ | On
118
+ label.btn.btn-primary.ajax-radio.active
119
+ input type="radio" name="loading_bar" value="false" checked="true"
120
+ | Off
121
+
122
+
123
+ h2.sub-header#data Data
124
+
125
+ .row.setting
126
+ .col-md-12
127
+ h4 Import Links
128
+ .row
129
+ .col-md-8
130
+ p.help-block
131
+ | Select a <a href="http://fileformats.archiveteam.org/wiki/Netscape_bookmarks" target="_blank">Bookmark HTML file</a>, generated by most owsers and tools such as <em>Delicious</em>
132
+
133
+ .col-md-4
134
+ form role="form" action="/import" method="POST" enctype="multipart/form-data"
135
+ input type="file" name="file"
136
+ button.btn.btn-primary#button-import type="submit" title="Import"
137
+ span> class="glyphicon glyphicon-import"
138
+ | Import
139
+
140
+ .row.setting
141
+ .col-md-12
142
+ h4 Export Links
143
+ .row
144
+ .col-md-8
145
+ p.help-block Not supported...
146
+ .col-md-4
147
+ span> class="glyphicon glyphicon-export"
148
+ p ...yet
149
+
150
+ h2.sub-header#erase-stuff Erase Stuff
151
+
152
+ p.help-block
153
+ | All these options are highly destructive.
154
+ p.help-block
155
+ | There's no way to get your data back once it's gone!
156
+
157
+ .row.setting
158
+ .col-md-12
159
+ h4 Erase all Links
160
+ .row
161
+ .col-md-8
162
+ p.help-block Deletes all links, keeping Tags, Categories and every other information.
163
+
164
+ .col-md-4
165
+ form role="form" action="/all-links" method="POST"
166
+ input type="hidden" name="_method" value="DELETE"
167
+
168
+ button.btn.btn-sm.btn-warning type="submit" title="Exterminate Links"
169
+ span.glyphicon.glyphicon-trash
170
+ '
171
+ | Exterminate Links
172
+
173
+ .row.setting
174
+ .col-md-12
175
+ h4 Erase all Tags
176
+ .row
177
+ .col-md-8
178
+ p.help-block Deletes all tags, keeping every other information.
179
+
180
+ .col-md-4
181
+ form role="form" action="/all-tags" method="POST"
182
+ input type="hidden" name="_method" value="DELETE"
183
+
184
+ button.btn.btn-sm.btn-warning type="submit" title="Exterminate Tags"
185
+ span.glyphicon.glyphicon-trash
186
+ '
187
+ | Exterminate Tags
188
+
189
+ .row.setting
190
+ .col-md-12
191
+ h4 Erase all Categories
192
+ .row
193
+ .col-md-8
194
+ p.help-block Deletes all categories, but not their links.
195
+
196
+ .col-md-4
197
+ form role="form" action="/all-categories" method="POST"
198
+ input type="hidden" name="_method" value="DELETE"
199
+
200
+ button.btn.btn-sm.btn-warning type="submit" title="Exterminate Categories"
201
+ span> class="glyphicon glyphicon-trash"
202
+ | Exterminate Categories
203
+
204
+
205
+ .row.setting
206
+ .col-md-12
207
+ h4 Erase Everything
208
+ .row
209
+ .col-md-8
210
+ p.help-block Deletes the entire database - Tags, Links, Categories... Watch out!
211
+
212
+ .col-md-4
213
+ form role="form" action="/everything" method="POST"
214
+ input type="hidden" name="_method" value="DELETE"
215
+
216
+
217
+ button.btn.btn-sm.btn-danger type="submit" title="Delete Everything"
218
+ span> class="glyphicon glyphicon-fire"
219
+ | Destroy all Stuff
220
+
@@ -0,0 +1,37 @@
1
+ / Layout for a single Category
2
+ It will get shown as a part of a greater
3
+ list
4
+ Local variable: category
5
+
6
+ li.folder.list-group-item.nolink
7
+
8
+ / This span is for FancyTree to allow
9
+ inserting arbitrary HTML on items
10
+ span
11
+ a href="/category/#{category.id}" = category.name
12
+
13
+ - if (not category.childs.empty?) or (not category.links.empty?)
14
+ ul
15
+ - if not category.childs.empty?
16
+ - category.childs.each do |child|
17
+ == slim(:single_category, locals: { category: child })
18
+
19
+ - if not category.links.empty?
20
+ - category.links.each do |link|
21
+ li.list-group-item
22
+ span
23
+ / This empty <a> tag is for FancyTree to redirect
24
+ to it when pressing ENTER or SPACE.
25
+ That's because it redirects to the FIRST link
26
+ it finds.
27
+ So if you want to redirect to the EXTERNAL link
28
+ just delete this
29
+ a.link-internal-link href="/link/#{link.id}"
30
+
31
+ - if link.title.empty?
32
+ a.link-link target="_blank" href="#{link.url}" data-link-id="#{link.id}"
33
+ | #{link.url}
34
+ - else
35
+ a.link-link target="_blank" href="#{link.url}" data-link-id="#{link.id}"
36
+ | #{link.title}
37
+
@@ -0,0 +1,95 @@
1
+ /
2
+ Layout for a single Link
3
+ It will get shown as a part of a greater
4
+ list
5
+ Local variable: link
6
+
7
+ li.link.list-group-item.hoverable-parent.ajax-delete-parent data-link-id="#{link.id}"
8
+ .row
9
+ span.link-title
10
+ - if link.title.empty?
11
+ a target="_blank" href="#{link.url}" = link.url
12
+ - else
13
+ a target="_blank" href="#{link.url}" = link.title
14
+ span.link-title-short-url
15
+ | #{link.url.host}
16
+
17
+ .row
18
+ .link-categories
19
+ - if link.category
20
+ a.link-category href="/category/#{link.category.id}" title="#{link.category.name}"
21
+ span.label.label-default = link.category.name
22
+ .row
23
+ .link-tags
24
+ - if link.tags
25
+ - link.tags.each do |tag|
26
+ a.link-tag href="/tag/#{tag.id}" title="#{tag.name}"
27
+ span.badge = tag.name
28
+ .row
29
+ span.link-internal-link
30
+ a.btn.btn-xs.btn-primary href="/link/#{link.id}" title="Internal Link"
31
+ span.label.label-primary
32
+ span.glyphicon.glyphicon-link
33
+
34
+ span.link-checkbox
35
+ | possibly checkbox
36
+
37
+ /span.asdasdcol-md-4.hoverable-children
38
+ span.link-controls
39
+ button.btn.btn-xs.btn-primary.link-favorite title="Favorite"
40
+ span class="glyphicon glyphicon-star#{if not link.favorite then '-empty' end}"
41
+
42
+ button.btn.btn-xs.btn-primary.link-edit title="Edit Link" data-toggle="modal" data-target="#edit-link"
43
+ span.glyphicon.glyphicon-pencil
44
+
45
+ form action="/link/#{link.id}" method="POST"
46
+ .form-group
47
+ / Most browsers don't recognize the DELETE
48
+ HTTP method, so this is a fake for Sinatra
49
+ to recognize it as DELETE anyway
50
+ input type="hidden" name="_method" value="DELETE"
51
+
52
+ button.ajax-delete.btn.btn-xs.btn-primary type="submit" title="Delete Link"
53
+ span.glyphicon.glyphicon-trash
54
+
55
+
56
+ .row
57
+ span.link-description
58
+ / We need this to retain line breaks
59
+ from the original comment
60
+ - if link.comment
61
+ - link.comment.split("\n").each do |line|
62
+ = line
63
+ br/
64
+
65
+ span.link-added
66
+ - if Sharkey::Setting['date_format'] == 'relative'
67
+ | Added
68
+ time<> datetime="#{formatted_date(link.added_at)}"
69
+ | #{relative_date(link.added_at)}
70
+ | ago
71
+ - else
72
+ | Added
73
+ time< datetime="#{formatted_date(link.added_at)}"
74
+ | #{formatted_date(link.added_at)}
75
+
76
+ .row
77
+ span.link-visited
78
+ span.link-visited-date
79
+ - if link.visited?
80
+ - if Sharkey::Setting['date_format'] == 'relative'
81
+ | Last visited
82
+ time<> datetime="#{formatted_date(link.last_visit)}"
83
+ | #{relative_date(link.last_visit)}
84
+ | ago
85
+ - else
86
+ | Last visited
87
+ time< datetime="#{formatted_date(link.last_visit)}"
88
+ | #{formatted_date(link.last_visit)}
89
+
90
+ '
91
+ span.badge.link-visited-count
92
+ span.glyphicon.glyphicon-open
93
+ '
94
+ = link.visit_count
95
+