elabs 3.0.0 → 4.0.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +89 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +7 -2
- data/README.md +24 -17
- data/ROADMAP.md +8 -7
- data/app/assets/javascripts/elabs/application.js.erb +42 -0
- data/app/assets/javascripts/elabs/forms.js +10 -0
- data/app/assets/javascripts/elabs/helpers-markdown.js +11 -33
- data/app/assets/javascripts/elabs/helpers.js +28 -0
- data/app/assets/javascripts/elabs/hljs.js +4 -0
- data/app/assets/stylesheets/elabs/_colors.scss +5 -0
- data/app/assets/stylesheets/elabs/_fixes.scss +6 -0
- data/app/assets/stylesheets/elabs/_icons.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_acts.scss +11 -0
- data/app/assets/stylesheets/elabs/app/_buttons.scss +8 -0
- data/app/assets/stylesheets/elabs/app/_comments.scss +10 -1
- data/app/assets/stylesheets/elabs/app/_content.scss +15 -0
- data/app/assets/stylesheets/elabs/app/_content_statuses.scss +32 -0
- data/app/assets/stylesheets/elabs/app/_forms.scss +5 -0
- data/app/assets/stylesheets/elabs/app/_helpers.scss +10 -0
- data/app/assets/stylesheets/elabs/app/_layout.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_modals.scss +4 -0
- data/app/assets/stylesheets/elabs/app/_tables.scss +31 -0
- data/app/assets/stylesheets/elabs/app/_typo.scss +14 -0
- data/app/assets/stylesheets/elabs/app/_users.scss +14 -6
- data/app/assets/stylesheets/elabs/app/admin-members/_forms.scss +8 -1
- data/app/assets/stylesheets/elabs/app/admin-members/_indexes.scss +1 -26
- data/app/assets/stylesheets/elabs/app/mixins/_content-card.scss +11 -1
- data/app/assets/stylesheets/elabs/app/mixins/_content-full.scss +26 -0
- data/app/assets/stylesheets/elabs/app/mixins/_content-inline.scss +7 -0
- data/app/assets/stylesheets/elabs/app/widgets/_git-cards.scss +88 -0
- data/app/assets/stylesheets/elabs/lib/_hljs.scss +5 -0
- data/app/assets/stylesheets/elabs/lib/fontawesome/_icons.scss +11 -11
- data/app/assets/stylesheets/elabs/lib/knacss/_knacss-variables.scss +10 -2
- data/app/assets/stylesheets/elabs/style.scss +11 -1
- data/app/controllers/elabs/admin/admin_application_controller.rb +1 -1
- data/app/controllers/elabs/admin/admin_content_application_controller.rb +2 -2
- data/app/controllers/elabs/admin/languages_controller.rb +1 -1
- data/app/controllers/elabs/admin/licenses_controller.rb +1 -1
- data/app/controllers/elabs/admin/tags_controller.rb +1 -1
- data/app/controllers/elabs/admin/users_controller.rb +1 -1
- data/app/controllers/elabs/albums_controller.rb +1 -1
- data/app/controllers/elabs/articles_controller.rb +1 -1
- data/app/controllers/elabs/content_application_controller.rb +2 -1
- data/app/controllers/elabs/elabs_public_controller.rb +28 -8
- data/app/controllers/elabs/languages_controller.rb +1 -1
- data/app/controllers/elabs/licenses_controller.rb +1 -1
- data/app/controllers/elabs/member/albums_controller.rb +1 -1
- data/app/controllers/elabs/member/articles_controller.rb +1 -1
- data/app/controllers/elabs/member/markdown_previewer_controller.rb +11 -0
- data/app/controllers/elabs/member/member_content_application_controller.rb +2 -2
- data/app/controllers/elabs/member/notes_controller.rb +1 -1
- data/app/controllers/elabs/member/projects_controller.rb +1 -1
- data/app/controllers/elabs/member/uploads_controller.rb +1 -1
- data/app/controllers/elabs/notes_controller.rb +1 -1
- data/app/controllers/elabs/projects_controller.rb +1 -1
- data/app/controllers/elabs/tags_controller.rb +1 -6
- data/app/controllers/elabs/uploads_controller.rb +1 -1
- data/app/controllers/elabs/users_controller.rb +1 -1
- data/app/helpers/elabs/acts_helper.rb +2 -2
- data/app/helpers/elabs/application_helper.rb +30 -3
- data/app/helpers/elabs/content_helper.rb +9 -3
- data/app/helpers/elabs/content_renderer_helper.rb +118 -8
- data/app/helpers/elabs/rss_helper.rb +9 -0
- data/app/helpers/elabs/thumbnails_helper.rb +24 -19
- data/app/helpers/elabs/time_helper.rb +7 -1
- data/app/models/elabs/album.rb +2 -0
- data/app/models/elabs/application_content_record.rb +3 -0
- data/app/models/elabs/article.rb +2 -0
- data/app/models/elabs/concerns/actable_entity.rb +17 -2
- data/app/models/elabs/concerns/content_entity.rb +2 -2
- data/app/models/elabs/concerns/sluggable.rb +40 -0
- data/app/models/elabs/language.rb +8 -0
- data/app/models/elabs/license.rb +5 -0
- data/app/models/elabs/note.rb +2 -0
- data/app/models/elabs/project.rb +3 -0
- data/app/models/elabs/tag.rb +5 -0
- data/app/models/elabs/upload.rb +2 -0
- data/app/models/elabs/user.rb +10 -2
- data/app/views/elabs/acts/_act.rss.builder +22 -0
- data/app/views/elabs/acts/index.html.haml +5 -1
- data/app/views/elabs/acts/index.rss.builder +15 -0
- data/app/views/elabs/admin/albums/index.html.haml +4 -4
- data/app/views/elabs/admin/articles/index.html.haml +4 -4
- data/app/views/elabs/admin/languages/_form.html.haml +2 -1
- data/app/views/elabs/admin/licenses/_form.html.haml +2 -1
- data/app/views/elabs/admin/notes/index.html.haml +5 -5
- data/app/views/elabs/admin/projects/index.html.haml +4 -4
- data/app/views/elabs/admin/reports/index.html.haml +2 -2
- data/app/views/elabs/admin/tags/_form.html.haml +2 -1
- data/app/views/elabs/admin/uploads/index.html.haml +4 -4
- data/app/views/elabs/admin/users/index.html.haml +3 -3
- data/app/views/elabs/admin/users/show.html.haml +2 -2
- data/app/views/elabs/albums/_album.html.haml +1 -1
- data/app/views/elabs/albums/_album.rss.builder +7 -0
- data/app/views/elabs/albums/_album_inline.html.haml +8 -0
- data/app/views/elabs/albums/index.rss.builder +14 -0
- data/app/views/elabs/albums/show.html.haml +3 -3
- data/app/views/elabs/articles/_article.html.haml +1 -1
- data/app/views/elabs/articles/_article.rss.builder +7 -0
- data/app/views/elabs/articles/_article_inline.html.haml +8 -0
- data/app/views/elabs/articles/index.rss.builder +14 -0
- data/app/views/elabs/articles/show.html.haml +4 -4
- data/app/views/elabs/comments/_comments.html.haml +4 -3
- data/app/views/elabs/comments/_form.html.haml +18 -6
- data/app/views/elabs/languages/_associations.html.haml +15 -5
- data/app/views/elabs/layouts/_footer.html.haml +8 -1
- data/app/views/elabs/layouts/_hidden_entry.html.haml +4 -4
- data/app/views/elabs/layouts/_hidden_entry_full.html.haml +4 -4
- data/app/views/elabs/layouts/_hidden_entry_inline.html.haml +6 -0
- data/app/views/elabs/layouts/_shortcode_infinite_loop.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_infinite_loop_inline.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_missing_content.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_missing_content_inline.html.haml +2 -0
- data/app/views/elabs/layouts/_shortcode_open_to_see.html.haml +2 -0
- data/app/views/elabs/layouts/admin_application.html.haml +2 -2
- data/app/views/elabs/layouts/application.html.haml +11 -3
- data/app/views/elabs/layouts/member_application.html.haml +5 -2
- data/app/views/elabs/layouts/widgets/_github_repo_card.html.haml +12 -0
- data/app/views/elabs/layouts/widgets/_github_repo_inline.html.haml +8 -0
- data/app/views/elabs/layouts/widgets/_github_user_card.html.haml +7 -0
- data/app/views/elabs/layouts/widgets/_gitlab_group_card.html.haml +11 -0
- data/app/views/elabs/layouts/widgets/_gitlab_repo_card.html.haml +12 -0
- data/app/views/elabs/layouts/widgets/_gitlab_repo_inline.html.haml +8 -0
- data/app/views/elabs/layouts/widgets/_gitlab_user_card.html.haml +11 -0
- data/app/views/elabs/layouts/widgets/vue/_all_widgets.html.haml +5 -0
- data/app/views/elabs/layouts/widgets/vue/_github_repo_card_vue.html.haml +72 -0
- data/app/views/elabs/layouts/widgets/vue/_github_user_card_vue.html.haml +64 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_group_card_vue.html.haml +64 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_repo_card_vue.html.haml +69 -0
- data/app/views/elabs/layouts/widgets/vue/_gitlab_user_card_vue.html.haml +99 -0
- data/app/views/elabs/licenses/_associations.html.haml +15 -5
- data/app/views/elabs/licenses/show.json.jbuilder +1 -1
- data/app/views/elabs/member/albums/_form.html.haml +12 -1
- data/app/views/elabs/member/albums/index.html.haml +4 -4
- data/app/views/elabs/member/articles/_form.html.haml +12 -1
- data/app/views/elabs/member/articles/index.html.haml +4 -4
- data/app/views/elabs/member/markdown_previewer/preview.json.jbuilder +2 -0
- data/app/views/elabs/member/notes/_form.html.haml +12 -1
- data/app/views/elabs/member/notes/index.html.haml +4 -4
- data/app/views/elabs/member/notifications/index.html.haml +1 -1
- data/app/views/elabs/member/preferences/_form.html.haml +2 -1
- data/app/views/elabs/member/projects/_form.html.haml +18 -2
- data/app/views/elabs/member/projects/_project.json.jbuilder +2 -0
- data/app/views/elabs/member/projects/index.html.haml +4 -4
- data/app/views/elabs/member/uploads/_form.html.haml +12 -1
- data/app/views/elabs/member/uploads/index.html.haml +6 -9
- data/app/views/elabs/member/users/_form.html.haml +2 -1
- data/app/views/elabs/notes/_note.html.haml +2 -2
- data/app/views/elabs/notes/_note.rss.builder +7 -0
- data/app/views/elabs/notes/_note_inline.haml +8 -0
- data/app/views/elabs/notes/index.rss.builder +14 -0
- data/app/views/elabs/notes/show.html.haml +3 -3
- data/app/views/elabs/projects/_associations.html.haml +12 -4
- data/app/views/elabs/projects/_project.html.haml +1 -1
- data/app/views/elabs/projects/_project.json.jbuilder +2 -0
- data/app/views/elabs/projects/_project.rss.builder +7 -0
- data/app/views/elabs/projects/_project_inline.html.haml +9 -0
- data/app/views/elabs/projects/index.rss.builder +14 -0
- data/app/views/elabs/projects/show.html.haml +20 -9
- data/app/views/elabs/reports/_form.html.haml +2 -1
- data/app/views/elabs/tags/_associations.html.haml +15 -5
- data/app/views/elabs/tags/index.html.haml +2 -0
- data/app/views/elabs/uploads/_preview.html.haml +1 -6
- data/app/views/elabs/uploads/_upload.rss.builder +7 -0
- data/app/views/elabs/uploads/_upload_inline.html.haml +8 -0
- data/app/views/elabs/uploads/index.rss.builder +14 -0
- data/app/views/elabs/uploads/show.html.haml +7 -8
- data/app/views/elabs/users/_associations.html.haml +15 -5
- data/app/views/elabs/users/_user.html.haml +24 -18
- data/app/views/elabs/users/_user_inline.html.haml +7 -0
- data/app/views/elabs/users/show.html.haml +2 -2
- data/config/brakeman.ignore +13 -111
- data/config/locales/en.yml +6 -0
- data/config/locales/fr.yml +6 -0
- data/config/routes.rb +30 -28
- data/db/migrate/20180917133442_add_urls_to_projects.rb +6 -0
- data/db/migrate/20181005105642_add_reason_to_acts.rb +5 -0
- data/db/migrate/20181006073541_add_slugs.rb +39 -0
- data/docs/migrating.md +51 -0
- data/docs/setup.md +1 -0
- data/lib/elabs.rb +5 -0
- data/lib/elabs/version.rb +1 -1
- data/lib/generators/elabs/install_generator.rb +1 -0
- data/lib/generators/elabs/views_generator.rb +0 -1
- data/lib/generators/templates/elabs.rb +4 -0
- data/lib/generators/templates/user_model.rb +6 -0
- data/locale/app.pot +129 -9
- data/locale/en/app.edit.po +127 -7
- data/locale/en/app.po +127 -7
- data/locale/fr/app.edit.po +130 -10
- data/locale/fr/app.po +129 -9
- metadata +59 -5
- data/app/assets/javascripts/elabs/application.js +0 -27
- data/app/assets/stylesheets/elabs/app/_nsfw.scss +0 -5
- data/lib/assets/javascripts/markdown-it-8.4.2.min.js +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
%script{ type: 'text/x-template', id: 'template-gitlab-repo-card' }
|
|
2
|
+
.gitlab-card{ ':disabled': 'failed' }
|
|
3
|
+
.content{ 'v-if': 'ready && !failed' }
|
|
4
|
+
%h2
|
|
5
|
+
= icon 'gitlab', ['fw'], 'fab'
|
|
6
|
+
%template{ 'v-if': 'repo.namespace' }
|
|
7
|
+
%small
|
|
8
|
+
%a{ ':href': '"https://" + url.site + "/" + repo.namespace.full_path', target: '_blank' }
|
|
9
|
+
{{repo.namespace.name}}
|
|
10
|
+
\/
|
|
11
|
+
%a{ ':href': 'repo.web_url', target: '_blank' } {{repo.name}}
|
|
12
|
+
%small (#{format _('project on %<link>s'), link: '{{url.site}}'})
|
|
13
|
+
%ul.infos
|
|
14
|
+
%li
|
|
15
|
+
= icon_text 'calendar', _('Last activity:'), ['fw']
|
|
16
|
+
{{repo.last_activity_at}}
|
|
17
|
+
%li{ 'v-if': 'repo.homepage' }
|
|
18
|
+
= icon 'home', ['fw']
|
|
19
|
+
%a{ ':href': 'repo.homepage', target: '_blank' }= _('Home page')
|
|
20
|
+
%li
|
|
21
|
+
= icon 'star'
|
|
22
|
+
{{repo.star_count}}
|
|
23
|
+
%li
|
|
24
|
+
= icon_text 'code-branch', _('Forks:'), ['fw']
|
|
25
|
+
{{repo.forks_count}}
|
|
26
|
+
%pre.description{ 'v-if': 'repo.description' } {{repo.description}}
|
|
27
|
+
.alert.alert--warning{ 'v-else-if': 'failed && !error' }
|
|
28
|
+
= icon_text 'bug', _('An error occured when fetching a Gitlab repository.'), ['fw']
|
|
29
|
+
.alert.alert--warning{ 'v-else-if': 'failed && error' }
|
|
30
|
+
= icon_text 'bug', _('Gitlab responded with the following error:'), ['fw']
|
|
31
|
+
%code {{error}}
|
|
32
|
+
.alert{ 'v-else': '' }
|
|
33
|
+
= icon_text 'spinner', _('Loading data from a Gitlab instance. Please wait.'), %w[fw pulse]
|
|
34
|
+
|
|
35
|
+
:javascript
|
|
36
|
+
function gitlabRepoCard (url, target_element) {
|
|
37
|
+
return new Vue({
|
|
38
|
+
name: 'GitlabRepoCardWidget',
|
|
39
|
+
template: '#template-gitlab-repo-card',
|
|
40
|
+
el: document.getElementById(target_element),
|
|
41
|
+
data: function () {
|
|
42
|
+
return {
|
|
43
|
+
ready: false,
|
|
44
|
+
failed: false,
|
|
45
|
+
error: '',
|
|
46
|
+
url: url,
|
|
47
|
+
repo: {},
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
created () {
|
|
51
|
+
var that = this
|
|
52
|
+
fetch('https://' + this.url.site + '/api/v4/projects/' + encodeURIComponent(this.url.repo), {method: 'GET'})
|
|
53
|
+
.then(function (res) {
|
|
54
|
+
if(res.ok){
|
|
55
|
+
res.json().then(function (data) {
|
|
56
|
+
that.repo = data
|
|
57
|
+
that.ready = true
|
|
58
|
+
})
|
|
59
|
+
} else {
|
|
60
|
+
that.failed = true
|
|
61
|
+
that.error = res.statusText
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.catch(function (err) {
|
|
65
|
+
that.failed = true
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
%script{ type: 'text/x-template', id: 'template-gitlab-user-card' }
|
|
2
|
+
.gitlab-card{ 'v-if': 'ready && !failed' }
|
|
3
|
+
.icon.icon--avatar
|
|
4
|
+
= icon 'gitlab', %w[fw avatar-badge], 'fab'
|
|
5
|
+
%img.avatar{ ':src': 'user.avatar_url' }
|
|
6
|
+
.content
|
|
7
|
+
%h2
|
|
8
|
+
%a{ ':href': 'user.web_url', target: '_blank' } {{user.name}}
|
|
9
|
+
%small (#{format _('@%<user>s on %<link>s'), user: '{{user.username}}', link: '{{url.site}}'})
|
|
10
|
+
%ul.infos
|
|
11
|
+
%li{ 'v-if': 'user.website_url' }
|
|
12
|
+
= icon 'home', ['fw']
|
|
13
|
+
%a{ ':href': 'user.website_url', target: '_blank' }= _('Home page')
|
|
14
|
+
%li
|
|
15
|
+
= icon_text 'book', _('Public repos:'), ['fw']
|
|
16
|
+
{{repos.length}}
|
|
17
|
+
.gitlab-card{ 'v-else-if': 'failed', ':disabled': 'failed' }
|
|
18
|
+
.alert.alert--warning
|
|
19
|
+
= icon_text 'bug', _('An error occured when fetching a Gitlab user.'), ['fw']
|
|
20
|
+
.gitlab-card{ 'v-else': '' }
|
|
21
|
+
.icon.icon--avatar
|
|
22
|
+
= icon 'gitlab', %w[fw avatar-badge], 'fab'
|
|
23
|
+
= icon 'user', %w[3x fw avatar]
|
|
24
|
+
.alert
|
|
25
|
+
= icon_text 'spinner', _('Loading data from a Gitlab instance. Please wait.'), %w[fw pulse]
|
|
26
|
+
|
|
27
|
+
:javascript
|
|
28
|
+
function gitlabUserCard (url, targetElement) {
|
|
29
|
+
return new Vue({
|
|
30
|
+
name: 'GitlabUserCardWidget',
|
|
31
|
+
template: '#template-gitlab-user-card',
|
|
32
|
+
el: document.getElementById(targetElement),
|
|
33
|
+
data: function () {
|
|
34
|
+
return {
|
|
35
|
+
userReady: false,
|
|
36
|
+
reposReady: false,
|
|
37
|
+
failed: false,
|
|
38
|
+
url: url,
|
|
39
|
+
user: {},
|
|
40
|
+
repos: {},
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
ready: function(){
|
|
45
|
+
return this.userReady && this.reposReady
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
created () {
|
|
49
|
+
var that = this
|
|
50
|
+
// Find the id first
|
|
51
|
+
fetch('https://' + this.url.site + '/api/v4/users?username=' + encodeURIComponent(url.user), {method: 'GET'})
|
|
52
|
+
.then(function (res) {
|
|
53
|
+
if(res.ok){
|
|
54
|
+
res.json().then(function (data) {
|
|
55
|
+
if(data.length === 1){
|
|
56
|
+
// Find user data
|
|
57
|
+
fetch('https://' + that.url.site + '/api/v4/users/' + data[0].id, {method: 'GET'})
|
|
58
|
+
.then(function (res) {
|
|
59
|
+
if(res.ok){
|
|
60
|
+
res.json().then(function (data) {
|
|
61
|
+
that.user = data
|
|
62
|
+
that.userReady = true
|
|
63
|
+
})
|
|
64
|
+
} else {
|
|
65
|
+
that.failed = true
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
.catch(function (err) {
|
|
69
|
+
that.failed = true
|
|
70
|
+
})
|
|
71
|
+
// User projects
|
|
72
|
+
fetch('https://' + that.url.site + '/api/v4/users/' + data[0].id + '/projects', {method: 'GET'})
|
|
73
|
+
.then(function (res) {
|
|
74
|
+
if(res.ok){
|
|
75
|
+
res.json().then(function (data) {
|
|
76
|
+
that.repos = data
|
|
77
|
+
that.reposReady = true
|
|
78
|
+
})
|
|
79
|
+
} else {
|
|
80
|
+
that.failed = true
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
.catch(function (err) {
|
|
84
|
+
that.failed = true
|
|
85
|
+
})
|
|
86
|
+
} else {
|
|
87
|
+
that.failed = true
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
that.failed = true
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
.catch(function (res) {
|
|
95
|
+
that.failed = true
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
%aside.tabs
|
|
2
2
|
%ul.tabs__tabs-list
|
|
3
3
|
%li.tabs__tabs-list__tab#tab-albums
|
|
4
|
-
%a{ href: '#tab-content-albums', onclick: 'selectTab(event, "albums")' }
|
|
4
|
+
%a{ href: '#tab-content-albums', onclick: 'selectTab(event, "albums")' }
|
|
5
|
+
= _('Albums')
|
|
6
|
+
%span.badge.badge--notification= license.albums_count
|
|
5
7
|
%li.tabs__tabs-list__tab#tab-articles
|
|
6
|
-
%a{ href: '#tab-content-articles', onclick: 'selectTab(event, "articles")' }
|
|
8
|
+
%a{ href: '#tab-content-articles', onclick: 'selectTab(event, "articles")' }
|
|
9
|
+
= _('Articles')
|
|
10
|
+
%span.badge.badge--notification= license.articles_count
|
|
7
11
|
%li.tabs__tabs-list__tab#tab-notes
|
|
8
|
-
%a{ href: '#tab-content-notes', onclick: 'selectTab(event, "notes")' }
|
|
12
|
+
%a{ href: '#tab-content-notes', onclick: 'selectTab(event, "notes")' }
|
|
13
|
+
= _('Notes')
|
|
14
|
+
%span.badge.badge--notification= license.notes_count
|
|
9
15
|
%li.tabs__tabs-list__tab#tab-projects
|
|
10
|
-
%a{ href: '#tab-content-projects', onclick: 'selectTab(event, "projects")' }
|
|
16
|
+
%a{ href: '#tab-content-projects', onclick: 'selectTab(event, "projects")' }
|
|
17
|
+
= _('Projects')
|
|
18
|
+
%span.badge.badge--notification= license.projects_count
|
|
11
19
|
%li.tabs__tabs-list__tab#tab-uploads
|
|
12
|
-
%a{ href: '#tab-content-uploads', onclick: 'selectTab(event, "uploads")' }
|
|
20
|
+
%a{ href: '#tab-content-uploads', onclick: 'selectTab(event, "uploads")' }
|
|
21
|
+
= _('Uploads')
|
|
22
|
+
%span.badge.badge--notification= license.uploads_count
|
|
13
23
|
|
|
14
24
|
%section.tabs__tab-content.albums-list#tab-content-albums
|
|
15
25
|
.tabs__tab-content__title
|
|
@@ -1 +1 @@
|
|
|
1
|
-
json.partial! '
|
|
1
|
+
json.partial! 'license', license: @license
|
|
@@ -52,7 +52,18 @@
|
|
|
52
52
|
.field-hint= _('List of comma-separated tags')
|
|
53
53
|
|
|
54
54
|
.actions
|
|
55
|
-
|
|
55
|
+
- if album.id
|
|
56
|
+
.field
|
|
57
|
+
.field-input
|
|
58
|
+
= f.check_box :minor_update, onchange: "toggleUpdateMessageField(event, 'album_update_description')"
|
|
59
|
+
= f.label :minor_update, _('This is a minor edition')
|
|
60
|
+
.field
|
|
61
|
+
= f.label :update_description, _('Update message')
|
|
62
|
+
.field-input
|
|
63
|
+
= f.text_field :update_description
|
|
64
|
+
.field-hint= _('If this is not a minor modification, you can specify the changes here.')
|
|
65
|
+
.actions-buttons
|
|
66
|
+
= f.submit _('Save'), class: 'btn btn--save'
|
|
56
67
|
|
|
57
68
|
= render 'elabs/member/layouts/markdown-preview'
|
|
58
69
|
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
- @albums.each do |album|
|
|
27
27
|
%tr.album
|
|
28
28
|
%td= album.name
|
|
29
|
-
%td.is-icon=
|
|
30
|
-
%td.is-icon=
|
|
31
|
-
%td.is-icon=
|
|
29
|
+
%td.is-icon= colored_good_or_bad_icon_tag album.sfw
|
|
30
|
+
%td.is-icon= colored_good_or_bad_icon_tag album.published
|
|
31
|
+
%td.is-icon= colored_good_or_bad_icon_tag album.locked, 'lock', 'unlock', true
|
|
32
32
|
%td.is-icon= boolean_icon_tag album.hidden_in_history
|
|
33
|
-
%td=
|
|
33
|
+
%td= medium_datetime album.published_at
|
|
34
34
|
%td= album.language.name
|
|
35
35
|
%td
|
|
36
36
|
= license_icon album.license
|
|
@@ -56,7 +56,18 @@
|
|
|
56
56
|
.field-hint= _('List of comma-separated tags')
|
|
57
57
|
|
|
58
58
|
.actions
|
|
59
|
-
|
|
59
|
+
- if article.id
|
|
60
|
+
.field
|
|
61
|
+
.field-input
|
|
62
|
+
= f.check_box :minor_update, onchange: "toggleUpdateMessageField(event, 'article_update_description')"
|
|
63
|
+
= f.label :minor_update, _('This is a minor edition')
|
|
64
|
+
.field
|
|
65
|
+
= f.label :update_description, _('Update message')
|
|
66
|
+
.field-input
|
|
67
|
+
= f.text_field :update_description
|
|
68
|
+
.field-hint= _('If this is not a minor modification, you can specify the changes here.')
|
|
69
|
+
.actions-buttons
|
|
70
|
+
= f.submit _('Save'), class: 'btn btn--save'
|
|
60
71
|
|
|
61
72
|
= render 'elabs/member/layouts/markdown-preview'
|
|
62
73
|
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
- @articles.each do |article|
|
|
26
26
|
%tr.article
|
|
27
27
|
%td= article.title
|
|
28
|
-
%td.is-icon=
|
|
29
|
-
%td.is-icon=
|
|
30
|
-
%td.is-icon=
|
|
28
|
+
%td.is-icon= colored_good_or_bad_icon_tag article.sfw
|
|
29
|
+
%td.is-icon= colored_good_or_bad_icon_tag article.published
|
|
30
|
+
%td.is-icon= colored_good_or_bad_icon_tag article.locked, 'lock', 'unlock', true
|
|
31
31
|
%td.is-icon= boolean_icon_tag article.hidden_in_history
|
|
32
|
-
%td=
|
|
32
|
+
%td= medium_datetime article.published_at
|
|
33
33
|
%td
|
|
34
34
|
= license_icon article.license
|
|
35
35
|
= article.license.name
|
|
@@ -44,7 +44,18 @@
|
|
|
44
44
|
.field-hint= _('List of comma-separated tags')
|
|
45
45
|
|
|
46
46
|
.actions
|
|
47
|
-
|
|
47
|
+
- if note.id
|
|
48
|
+
.field
|
|
49
|
+
.field-input
|
|
50
|
+
= f.check_box :minor_update, onchange: "toggleUpdateMessageField(event, 'note_update_description')"
|
|
51
|
+
= f.label :minor_update, _('This is a minor edition')
|
|
52
|
+
.field
|
|
53
|
+
= f.label :update_description, _('Update message')
|
|
54
|
+
.field-input
|
|
55
|
+
= f.text_field :update_description
|
|
56
|
+
.field-hint= _('If this is not a minor modification, you can specify the changes here.')
|
|
57
|
+
.actions-buttons
|
|
58
|
+
= f.submit _('Save'), class: 'btn btn--save'
|
|
48
59
|
|
|
49
60
|
= render 'elabs/member/layouts/markdown-preview'
|
|
50
61
|
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
- @notes.each do |note|
|
|
26
26
|
%tr.note
|
|
27
27
|
%td= note.content[0...100]
|
|
28
|
-
%td.is-icon=
|
|
29
|
-
%td.is-icon=
|
|
30
|
-
%td.is-icon=
|
|
28
|
+
%td.is-icon= colored_good_or_bad_icon_tag note.sfw
|
|
29
|
+
%td.is-icon= colored_good_or_bad_icon_tag note.published
|
|
30
|
+
%td.is-icon= colored_good_or_bad_icon_tag note.locked, 'lock', 'unlock', true
|
|
31
31
|
%td.is-icon= boolean_icon_tag note.hidden_in_history
|
|
32
|
-
%td=
|
|
32
|
+
%td= medium_datetime note.published_at
|
|
33
33
|
%td
|
|
34
34
|
= license_icon note.license
|
|
35
35
|
= note.license.name
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
%tr.notification
|
|
15
15
|
%td.btn-group
|
|
16
16
|
= member_destroy_link('notification', notification, false)
|
|
17
|
-
%td=
|
|
17
|
+
%td= medium_datetime notification.created_at
|
|
18
18
|
%td
|
|
19
19
|
= notification_icon notification.event
|
|
20
20
|
= notification_message notification
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
.field
|
|
33
33
|
= f.label :main_url
|
|
34
34
|
.field-input= f.text_field :main_url
|
|
35
|
+
.field
|
|
36
|
+
= f.label :sources_url
|
|
37
|
+
.field-input= f.text_field :sources_url
|
|
38
|
+
.field
|
|
39
|
+
= f.label :docs_url
|
|
40
|
+
.field-input= f.text_field :docs_url
|
|
35
41
|
.field
|
|
36
42
|
.field-input
|
|
37
43
|
= f.check_box :sfw
|
|
@@ -57,7 +63,18 @@
|
|
|
57
63
|
.field-hint= _('List of comma-separated tags')
|
|
58
64
|
|
|
59
65
|
.actions
|
|
60
|
-
|
|
66
|
+
- if project.id
|
|
67
|
+
.field
|
|
68
|
+
.field-input
|
|
69
|
+
= f.check_box :minor_update, onchange: "toggleUpdateMessageField(event, 'project_update_description')"
|
|
70
|
+
= f.label :minor_update, _('This is a minor edition')
|
|
71
|
+
.field
|
|
72
|
+
= f.label :update_description, _('Update message')
|
|
73
|
+
.field-input
|
|
74
|
+
= f.text_field :update_description
|
|
75
|
+
.field-hint= _('If this is not a minor modification, you can specify the changes here.')
|
|
76
|
+
.actions-buttons
|
|
77
|
+
= f.submit _('Save'), class: 'btn btn--save'
|
|
61
78
|
|
|
62
79
|
= render 'elabs/member/layouts/markdown-preview'
|
|
63
80
|
|
|
@@ -68,4 +85,3 @@
|
|
|
68
85
|
var descriptionCM = initializeCodeMirrorIn(document.getElementById('project_description'))
|
|
69
86
|
var mdPreviewShortDescription = createMDPreviewer(shortDescriptionCM)
|
|
70
87
|
var mdPreviewDescription = createMDPreviewer(descriptionCM)
|
|
71
|
-
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
%tr.project
|
|
31
31
|
%td= project.name
|
|
32
32
|
%td= link_to project.main_url, project.main_url, target: '_blank'
|
|
33
|
-
%td.is-icon=
|
|
34
|
-
%td.is-icon=
|
|
35
|
-
%td.is-icon=
|
|
33
|
+
%td.is-icon= colored_good_or_bad_icon_tag project.sfw
|
|
34
|
+
%td.is-icon= colored_good_or_bad_icon_tag project.published
|
|
35
|
+
%td.is-icon= colored_good_or_bad_icon_tag project.locked, 'lock', 'unlock', true
|
|
36
36
|
%td.is-icon= boolean_icon_tag project.hidden_in_history
|
|
37
|
-
%td=
|
|
37
|
+
%td= medium_datetime project.published_at
|
|
38
38
|
%td
|
|
39
39
|
= license_icon project.license
|
|
40
40
|
= project.license.name
|
|
@@ -57,7 +57,18 @@
|
|
|
57
57
|
.field-hint= _('List of comma-separated tags')
|
|
58
58
|
|
|
59
59
|
.actions
|
|
60
|
-
|
|
60
|
+
- if upload.id
|
|
61
|
+
.field
|
|
62
|
+
.field-input
|
|
63
|
+
= f.check_box :minor_update, onchange: "toggleUpdateMessageField(event, 'upload_update_description')"
|
|
64
|
+
= f.label :minor_update, _('This is a minor edition')
|
|
65
|
+
.field
|
|
66
|
+
= f.label :update_description, _('Update message')
|
|
67
|
+
.field-input
|
|
68
|
+
= f.text_field :update_description
|
|
69
|
+
.field-hint= _('If this is not a minor modification, you can specify the changes here.')
|
|
70
|
+
.actions-buttons
|
|
71
|
+
= f.submit _('Save'), class: 'btn btn--save'
|
|
61
72
|
|
|
62
73
|
= render 'elabs/member/layouts/markdown-preview'
|
|
63
74
|
|
|
@@ -27,20 +27,17 @@
|
|
|
27
27
|
- @uploads.each do |upload|
|
|
28
28
|
%tr.upload
|
|
29
29
|
%td
|
|
30
|
-
- if upload.file.
|
|
31
|
-
= image_tag
|
|
32
|
-
class: 'thumbnail--small'
|
|
33
|
-
- elsif upload.file.previewable?
|
|
34
|
-
= image_tag main_app.url_for(upload.file.preview(thumbnail_center_crop_properties(:small)).processed),
|
|
30
|
+
- if upload.file.representable?
|
|
31
|
+
= image_tag thumbnail_center_crop(upload.file, :small),
|
|
35
32
|
class: 'thumbnail--small'
|
|
36
33
|
- else
|
|
37
34
|
= image_tag main_app.url_for(thumbnail_preview_placeholder_file), class: 'thumbnail--small'
|
|
38
35
|
%td= upload.title
|
|
39
|
-
%td.is-icon=
|
|
40
|
-
%td.is-icon=
|
|
41
|
-
%td.is-icon=
|
|
36
|
+
%td.is-icon= colored_good_or_bad_icon_tag upload.sfw
|
|
37
|
+
%td.is-icon= colored_good_or_bad_icon_tag upload.published
|
|
38
|
+
%td.is-icon= colored_good_or_bad_icon_tag upload.locked, 'lock', 'unlock', true
|
|
42
39
|
%td.is-icon= boolean_icon_tag upload.hidden_in_history
|
|
43
|
-
%td=
|
|
40
|
+
%td= medium_datetime upload.published_at
|
|
44
41
|
%td= upload.language.name
|
|
45
42
|
%td
|
|
46
43
|
= license_icon upload.license
|