voluntary_music_metadata_enrichment 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +23 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/application.js +5 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/groups/show.js.coffee +14 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/index.js.coffee +19 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_releases/index_view.js.coffee +32 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_releases/new_view.js.coffee +31 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_tracks/index_view.js.coffee +32 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/year_in_review_tracks/new_view.js.coffee +31 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/library/years_in_review/index_view.js.coffee +36 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/tracks/show.js.coffee +2 -0
- data/app/assets/javascripts/voluntary_music_metadata_enrichment/videos/metadata.js.coffee +6 -0
- data/app/controllers/concerns/music_metadata_enrichment/artist_confirmation.rb +207 -0
- data/app/controllers/concerns/music_metadata_enrichment/base_controller.rb +17 -0
- data/app/controllers/concerns/music_metadata_enrichment/track_confirmation.rb +57 -0
- data/app/controllers/library/music/artists_controller.rb +26 -0
- data/app/controllers/library/music/year_in_review_releases_controller.rb +110 -0
- data/app/controllers/library/music/year_in_review_tracks_controller.rb +110 -0
- data/app/controllers/library/music/years_in_review_controller.rb +41 -0
- data/app/controllers/library/music_controller.rb +14 -0
- data/app/controllers/music_metadata_enrichment/application_controller.rb +11 -0
- data/app/controllers/music_metadata_enrichment/artists_controller.rb +93 -0
- data/app/controllers/music_metadata_enrichment/group_artist_connections_controller.rb +63 -0
- data/app/controllers/music_metadata_enrichment/groups_controller.rb +40 -0
- data/app/controllers/music_metadata_enrichment/releases_controller.rb +207 -0
- data/app/controllers/music_metadata_enrichment/tracks_controller.rb +82 -0
- data/app/controllers/music_metadata_enrichment/videos_controller.rb +133 -0
- data/app/controllers/product/music_metadata_enrichment_controller.rb +6 -0
- data/app/models/concerns/year_in_review_music_entry.rb +12 -0
- data/app/models/music_artist.rb +155 -0
- data/app/models/music_library_artist.rb +10 -0
- data/app/models/music_metadata_enrichment/group.rb +136 -0
- data/app/models/music_metadata_enrichment/group_artist_connection.rb +15 -0
- data/app/models/music_release.rb +278 -0
- data/app/models/music_track.rb +255 -0
- data/app/models/music_video.rb +87 -0
- data/app/models/product/music_metadata_enrichment.rb +2 -0
- data/app/models/year_in_review_music.rb +233 -0
- data/app/models/year_in_review_music_release.rb +24 -0
- data/app/models/year_in_review_music_track.rb +28 -0
- data/app/views/library/music/artists/destroy.js.erb +1 -0
- data/app/views/library/music/index.html.erb +46 -0
- data/app/views/library/music/year_in_review_releases/_collection.html.erb +51 -0
- data/app/views/library/music/year_in_review_releases/_form.html.erb +18 -0
- data/app/views/library/music/year_in_review_releases/_multiple_form.html.erb +44 -0
- data/app/views/library/music/year_in_review_releases/create.js.erb +11 -0
- data/app/views/library/music/year_in_review_releases/destroy.js.erb +2 -0
- data/app/views/library/music/year_in_review_releases/export.html.erb +13 -0
- data/app/views/library/music/year_in_review_releases/index.html.erb +22 -0
- data/app/views/library/music/year_in_review_releases/multiple_new.html.erb +1 -0
- data/app/views/library/music/year_in_review_releases/multiple_new.js.erb +7 -0
- data/app/views/library/music/year_in_review_releases/new.html.erb +1 -0
- data/app/views/library/music/year_in_review_tracks/_collection.html.erb +52 -0
- data/app/views/library/music/year_in_review_tracks/_form.html.erb +18 -0
- data/app/views/library/music/year_in_review_tracks/_multiple_form.html.erb +46 -0
- data/app/views/library/music/year_in_review_tracks/create.js.erb +11 -0
- data/app/views/library/music/year_in_review_tracks/destroy.js.erb +2 -0
- data/app/views/library/music/year_in_review_tracks/export.html.erb +13 -0
- data/app/views/library/music/year_in_review_tracks/index.html.erb +22 -0
- data/app/views/library/music/year_in_review_tracks/multiple_new.html.erb +1 -0
- data/app/views/library/music/year_in_review_tracks/multiple_new.js.erb +7 -0
- data/app/views/library/music/year_in_review_tracks/new.html.erb +1 -0
- data/app/views/library/music/years_in_review/_collection.html.erb +52 -0
- data/app/views/library/music/years_in_review/create.js.erb +6 -0
- data/app/views/library/music/years_in_review/index.html.erb +18 -0
- data/app/views/library/music/years_in_review/show.html.erb +20 -0
- data/app/views/music_metadata_enrichment/artists/_collection.html.erb +68 -0
- data/app/views/music_metadata_enrichment/artists/by_name.html.erb +3 -0
- data/app/views/music_metadata_enrichment/artists/index.html.erb +7 -0
- data/app/views/music_metadata_enrichment/artists/name_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/artists/new.html.erb +1 -0
- data/app/views/music_metadata_enrichment/artists/show.html.erb +24 -0
- data/app/views/music_metadata_enrichment/group_artist_connections/import.html.erb +6 -0
- data/app/views/music_metadata_enrichment/group_artist_connections/index.html.erb +0 -0
- data/app/views/music_metadata_enrichment/group_artist_connections/name_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/group_artist_connections/new.html.erb +1 -0
- data/app/views/music_metadata_enrichment/groups/index.html.erb +0 -0
- data/app/views/music_metadata_enrichment/groups/new.html.erb +7 -0
- data/app/views/music_metadata_enrichment/groups/show.html.erb +31 -0
- data/app/views/music_metadata_enrichment/releases/_collection.html.erb +53 -0
- data/app/views/music_metadata_enrichment/releases/announce.html.erb +10 -0
- data/app/views/music_metadata_enrichment/releases/artist_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/releases/by_name.html.erb +24 -0
- data/app/views/music_metadata_enrichment/releases/export.html.erb +17 -0
- data/app/views/music_metadata_enrichment/releases/index.html.erb +8 -0
- data/app/views/music_metadata_enrichment/releases/name.html.erb +9 -0
- data/app/views/music_metadata_enrichment/releases/name_confirmation.html.erb +33 -0
- data/app/views/music_metadata_enrichment/releases/new.html.erb +1 -0
- data/app/views/music_metadata_enrichment/releases/show.html.erb +50 -0
- data/app/views/music_metadata_enrichment/shared/_artist_confirmation_form.html.erb +41 -0
- data/app/views/music_metadata_enrichment/shared/_new_artist_form.html.erb +10 -0
- data/app/views/music_metadata_enrichment/shared/_new_track_form.html.erb +9 -0
- data/app/views/music_metadata_enrichment/shared/_track_confirmation_form.html.erb +29 -0
- data/app/views/music_metadata_enrichment/tracks/_spotify_track_player.html.erb +3 -0
- data/app/views/music_metadata_enrichment/tracks/artist_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/tracks/by_name.html.erb +26 -0
- data/app/views/music_metadata_enrichment/tracks/index.html.erb +8 -0
- data/app/views/music_metadata_enrichment/tracks/name.html.erb +1 -0
- data/app/views/music_metadata_enrichment/tracks/name_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/tracks/new.html.erb +1 -0
- data/app/views/music_metadata_enrichment/tracks/show.html.erb +21 -0
- data/app/views/music_metadata_enrichment/videos/_collection.html.erb +25 -0
- data/app/views/music_metadata_enrichment/videos/artist_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/videos/by_name.html.erb +3 -0
- data/app/views/music_metadata_enrichment/videos/index.html.erb +8 -0
- data/app/views/music_metadata_enrichment/videos/metadata.html.erb +25 -0
- data/app/views/music_metadata_enrichment/videos/new.html.erb +1 -0
- data/app/views/music_metadata_enrichment/videos/show.html.erb +9 -0
- data/app/views/music_metadata_enrichment/videos/track_confirmation.html.erb +1 -0
- data/app/views/music_metadata_enrichment/videos/track_name.html.erb +1 -0
- data/app/views/product/music_metadata_enrichment/index.html.erb +6 -0
- data/config/locales/en.yml +16 -0
- data/config/locales/resources/music_artists/en.yml +43 -0
- data/config/locales/resources/music_library/en.yml +8 -0
- data/config/locales/resources/music_metadata_enrichment_group_artist_connections/en.yml +19 -0
- data/config/locales/resources/music_metadata_enrichment_groups/en.yml +25 -0
- data/config/locales/resources/music_releases/en.yml +67 -0
- data/config/locales/resources/music_tracks/en.yml +45 -0
- data/config/locales/resources/music_videos/en.yml +56 -0
- data/config/locales/resources/year_in_review_music_releases/en.yml +19 -0
- data/config/locales/resources/year_in_review_music_tracks/en.yml +19 -0
- data/config/locales/resources/years_in_review_music/en.yml +21 -0
- data/config/main_music_metadata_enrichment_navigation.rb +3 -0
- data/config/routes.rb +121 -0
- data/db/migrate/20150106183434_add_product_music_metadata_enrichment.rb +96 -0
- data/db/migrate/20150120091801_create_music_metadata_enrichment_groups.rb +28 -0
- data/db/migrate/20150120221419_create_music_library_artists.rb +12 -0
- data/db/migrate/20150123082224_year_in_review_music_entries.rb +53 -0
- data/lib/tasks/voluntary_music_metadata_enrichment_tasks.rake +4 -0
- data/lib/voluntary_music_metadata_enrichment/ability.rb +27 -0
- data/lib/voluntary_music_metadata_enrichment/concerns/model/user/has_music_library.rb +101 -0
- data/lib/voluntary_music_metadata_enrichment/engine.rb +20 -0
- data/lib/voluntary_music_metadata_enrichment/navigation.rb +49 -0
- data/lib/voluntary_music_metadata_enrichment/version.rb +3 -0
- data/lib/voluntary_music_metadata_enrichment.rb +13 -0
- metadata +525 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if @year_in_review_track.persisted? %>
|
2
|
+
$('#years_in_review').html('<%= escape_javascript render(partial: 'library/music/year_in_review_tracks/collection') %>');
|
3
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.makeCollectionSortable();
|
4
|
+
$('#bootstrap_modal').modal('hide')
|
5
|
+
<% else %>
|
6
|
+
$('#bootstrap_modal').html('<%= escape_javascript render(partial: 'library/music/year_in_review_tracks/form') %>');
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% if @notice.present? %>
|
10
|
+
alert('<%= @notice %>');
|
11
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="modal-header">
|
2
|
+
<button type="button" id="close_bootstrap_modal_button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
3
|
+
<h3><%= t('year_in_review_music_tracks.export.title', year: params[:year])%></h3>
|
4
|
+
</div>
|
5
|
+
<div class="modal-body" style="overflow-y:none;">
|
6
|
+
<textarea rows="20" style="width:515px;">
|
7
|
+
<% @year_in_review_tracks.each do |year_in_review_track| %>
|
8
|
+
<%= year_in_review_track.position %>. [artist]<%= year_in_review_track.artist_name %>[/artist] - [track artist=<%= year_in_review_track.artist_name %>]<%= year_in_review_track.track_name %>[/track]
|
9
|
+
<% end %>
|
10
|
+
</textarea>
|
11
|
+
</div>
|
12
|
+
<div class="modal-footer">
|
13
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% content_for(:title) do %>
|
2
|
+
<%= t('year_in_review_music_tracks.index.title', user: name_with_apostrophe(@user.lastfm_user_name || @user.full_name), year: params[:year]) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :breadcrumbs do %>
|
6
|
+
<%= raw [
|
7
|
+
link_to(I18n.t('music_library.index.title', name: name_with_apostrophe(@user.lastfm_user_name || @user.full_name)), user_music_library_path(@user)),
|
8
|
+
link_to(I18n.t('years_in_review_music.index.short_title'), user_music_years_in_review_path(@user)),
|
9
|
+
link_to(I18n.t('years_in_review_music.show.title', year: @year_in_review.year), user_music_year_in_review_path(@user, @year_in_review.year)),
|
10
|
+
link_to(I18n.t('year_in_review_music_tracks.index.shortest_title'), user_music_year_in_review_top_tracks_path(@user, @year_in_review.year))
|
11
|
+
].join(' > ') %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% content_for :document_ready do %>
|
15
|
+
new window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView(false);
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= image_tag 'voluntary/spinner.gif', id: 'years_in_review_spinner', class: 'hide' %>
|
19
|
+
|
20
|
+
<div id="years_in_review">
|
21
|
+
<%= render partial: 'library/music/year_in_review_tracks/collection' %>
|
22
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'library/music/year_in_review_tracks/multiple_form' %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% if params[:commit] == I18n.t('general.close') || @tracks.none? %>
|
2
|
+
$('#years_in_review').html('<%= escape_javascript render(partial: 'library/music/year_in_review_tracks/collection') %>');
|
3
|
+
window.VoluntaryMusicMetadataEnrichment.Library.YearInReviewTracks.IndexView.makeCollectionSortable();
|
4
|
+
$('#bootstrap_modal').modal('hide')
|
5
|
+
<% else %>
|
6
|
+
$('#bootstrap_modal').html('<%= escape_javascript render(partial: 'library/music/year_in_review_tracks/multiple_form') %>');
|
7
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'library/music/year_in_review_tracks/form' %>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<h3><%= t('years_in_review_music.index.short_title') %></h3>
|
2
|
+
|
3
|
+
<% if @years_in_review.none? %>
|
4
|
+
<p><%= t('years_in_review_music.index.empty_collection') %></p>
|
5
|
+
<% else %>
|
6
|
+
<table class="table table-striped">
|
7
|
+
<thead>
|
8
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
9
|
+
<th style="width: 25px"><%= t("activerecord.attributes.year_in_review.year") %></th>
|
10
|
+
<th style="width: 75px"></th>
|
11
|
+
<th></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% @years_in_review.each do |year_in_review| %>
|
16
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
17
|
+
<td><%= link_to year_in_review.year, user_music_year_in_review_path(year_in_review.user_id, year_in_review.year) %></td>
|
18
|
+
<td>
|
19
|
+
<%= link_to(
|
20
|
+
user_music_year_in_review_top_releases_path(year_in_review.user_id, year_in_review.year),
|
21
|
+
class: 'year_in_review_music_releases_link', :'data-replace' => '#years_in_review'
|
22
|
+
) do %>
|
23
|
+
<%= t('year_in_review_music_releases.index.shortest_title') %>
|
24
|
+
<%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
<td>
|
28
|
+
<%= link_to(
|
29
|
+
user_music_year_in_review_top_tracks_path(year_in_review.user_id, year_in_review.year),
|
30
|
+
class: 'year_in_review_music_tracks_link', :'data-replace' => '#years_in_review'
|
31
|
+
) do %>
|
32
|
+
<%= t('year_in_review_music_tracks.index.shortest_title') %>
|
33
|
+
<%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
34
|
+
<% end %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<%= will_paginate @years_in_review %>
|
43
|
+
|
44
|
+
<% if current_user.try(:id) == params[:user_id].to_i %>
|
45
|
+
<%= form_tag(create_user_music_year_in_review_path(params[:user_id]), method: :post, class: 'form-search', id: 'new_music_year_in_review_form', remote: true) do %>
|
46
|
+
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
47
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @year_in_review } %>
|
48
|
+
<label for="year_in_review_music_year" class="integer required control-label"><abbr title="required">*</abbr> Year</label>
|
49
|
+
<%= text_field_tag 'year_in_review[year]', @year_in_review.year, class: 'input-medium search-query' %>
|
50
|
+
<button type="submit" class="btn"><%= t('years_in_review_music.index.add') %></button>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= t('years_in_review_music.index.title', user: name_with_apostrophe(@user.lastfm_user_name || @user.full_name)) %>
|
3
|
+
<% end %>
|
4
|
+
<% content_for :breadcrumbs do %>
|
5
|
+
<%= raw [
|
6
|
+
link_to(I18n.t('music_library.index.title', name: name_with_apostrophe(@user.lastfm_user_name || @user.full_name)), user_music_library_path(@user)),
|
7
|
+
link_to(I18n.t('years_in_review_music.index.short_title'), user_music_years_in_review_path(@user))
|
8
|
+
].join(' > ') %>
|
9
|
+
<% end %>
|
10
|
+
<% content_for :document_ready do %>
|
11
|
+
new window.VoluntaryMusicMetadataEnrichment.Library.YearsInReview.IndexView(false);
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= image_tag 'voluntary/spinner.gif', id: 'years_in_review_spinner', class: 'hide' %>
|
15
|
+
|
16
|
+
<div id="years_in_review">
|
17
|
+
<%= render partial: 'library/music/years_in_review/collection' %>
|
18
|
+
</div>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<% content_for(:title) do %>
|
2
|
+
<%= t('years_in_review_music.show.title_with_name', user: name_with_apostrophe(@user.lastfm_user_name || @user.full_name), year: params[:year]) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :breadcrumbs do %>
|
6
|
+
<%= raw [
|
7
|
+
link_to(I18n.t('music_library.index.title', name: name_with_apostrophe(@user.lastfm_user_name || @user.full_name)), user_music_library_path(@user)),
|
8
|
+
link_to(I18n.t('years_in_review_music.index.short_title'), user_music_years_in_review_path(@user)),
|
9
|
+
link_to(I18n.t('years_in_review_music.show.title', year: @year_in_review.year), user_music_year_in_review_path(@user, @year_in_review.year))
|
10
|
+
].join(' > ') %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<ul class="nav nav-tabs nav-stacked">
|
14
|
+
<li><%= link_to(
|
15
|
+
t('year_in_review_music_releases.index.shortest_title'), user_music_year_in_review_top_releases_path(params[:user_id], params[:year])
|
16
|
+
) %></li>
|
17
|
+
<li><%= link_to(
|
18
|
+
t('year_in_review_music_tracks.index.shortest_title'), user_music_year_in_review_top_tracks_path(params[:user_id], params[:year])
|
19
|
+
) %></li>
|
20
|
+
</ul>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<% with_disambiguation ||= false %>
|
2
|
+
<% with_founded_at ||= false %>
|
3
|
+
<% with_top_tracks ||= false %>
|
4
|
+
<% paginate ||= false %>
|
5
|
+
<% if @artists.none? %>
|
6
|
+
<p><%= title %></p>
|
7
|
+
<% else %>
|
8
|
+
<table class="table table-striped">
|
9
|
+
<thead>
|
10
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
11
|
+
<th style="width: 200px"><%= t("attributes.name") %></th>
|
12
|
+
<% if with_disambiguation %>
|
13
|
+
<th style="width: 200px"><%= t("activerecord.attributes.music_artist.disambiguation") %></th>
|
14
|
+
<% end %>
|
15
|
+
<% if with_founded_at %>
|
16
|
+
<th style="width: 75px"><%= t("activerecord.attributes.music_artist.founded_at") %></th>
|
17
|
+
<% end %>
|
18
|
+
<% if with_top_tracks %>
|
19
|
+
<th style="width: 100px"><%= t("music_artists.by_name.top3_tracks") %></th>
|
20
|
+
<% end %>
|
21
|
+
<th style="width: 75px"><%= t("attributes.listeners") %></th>
|
22
|
+
<% if user_signed_in? && current_user.id == params[:user_id].to_i %>
|
23
|
+
<th></th>
|
24
|
+
<% end %>
|
25
|
+
<% if @group.present? %>
|
26
|
+
<th></th>
|
27
|
+
<% end %>
|
28
|
+
</tr>
|
29
|
+
</thead>
|
30
|
+
<tbody>
|
31
|
+
<% @artists.each do |artist| %>
|
32
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
33
|
+
<td style="width: 200px"><%= link_to artist.name, music_artist_path(artist.id) %></td>
|
34
|
+
<% if with_disambiguation %>
|
35
|
+
<td style="width: 200px"><%= artist.disambiguation %></td>
|
36
|
+
<% end %>
|
37
|
+
<% if with_founded_at %>
|
38
|
+
<td style="width: 75px"><%= artist.founded_at.present? ? artist.founded_at.strftime('%d.%m.%Y') : '' %></td>
|
39
|
+
<% end %>
|
40
|
+
<% if with_top_tracks %>
|
41
|
+
<td style="width: 100px"><%= raw(artist.tracks.without_slaves.order('plays DESC').limit(3).map{|t| link_to(t.name, music_track_path(t.id)) }.join(', '))%></td>
|
42
|
+
<% end %>
|
43
|
+
<td style="width: 75px"><%= artist.listeners %></td>
|
44
|
+
<% if user_signed_in? && current_user.id == params[:user_id].to_i %>
|
45
|
+
<td>
|
46
|
+
<%= link_to destroy_music_library_artist_path(@music_library_artists[artist.id].id, page: params[:page]), method: :delete, remote: true, class: 'btn btn-danger destroy_music_library_artist_link' do %>
|
47
|
+
<%= t('general.remove') %> <%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
48
|
+
<% end %>
|
49
|
+
</td>
|
50
|
+
<% end %>
|
51
|
+
<% if @group.present? %>
|
52
|
+
<td style="padding: 0px"><%= render partial: 'shared/likes_and_dislikes', locals: { target: @group_artist_connections[artist.id], likes: @group_artist_connection_likes } %></td>
|
53
|
+
<% end %>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
<% end %>
|
59
|
+
<%= will_paginate @artists, params: { controller: '/music_metadata_enrichment/artists', action: 'index', id: nil }.merge(@pagination_params ||= {}) if paginate %>
|
60
|
+
<% if params[:group_id].present? %>
|
61
|
+
<p>
|
62
|
+
<%= link_to t('music_metadata_enrichment_group_artist_connections.new.short_title'), new_music_group_artist_path(params[:group_id]) %>
|
63
|
+
</p>
|
64
|
+
<% elsif params[:user_id].present? %>
|
65
|
+
<p>
|
66
|
+
<%= link_to t('music_library.index.add_artist'), new_user_music_library_artist_path(params[:user_id]) %>
|
67
|
+
</p>
|
68
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% content_for :search do %>
|
2
|
+
<%= form_tag by_name_music_artists_path, method: :get, class: 'form-search' do %>
|
3
|
+
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
4
|
+
<%= text_field_tag 'name', params[:name], class: 'input-medium search-query', placeholder: t('music_artists.index.search_placeholder') %>
|
5
|
+
<button type="submit" class="btn"><%= t('general.search') %></button>
|
6
|
+
<% end %>
|
7
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/artist_confirmation_form', locals: { title: t('music_artists.name_confirmation.title'), form_url: music_artists_path, form_method: :post } %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/new_artist_form', locals: { title: t('music_artists.new.title'), form_url: name_confirmation_music_artists_path } %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h3><%= @artist.name %></h3>
|
2
|
+
|
3
|
+
<dl class="dl-horizontal">
|
4
|
+
<%= show_attribute :mbid, value: link_to(@artist.mbid, "http://musicbrainz.org/artist/#{@artist.mbid}") %>
|
5
|
+
<%= show_attribute :founded_at, value: @artist.founded_at.present? ? @artist.founded_at.strftime('%d.%m.%Y') : nil %>
|
6
|
+
<%= show_attribute :dissolved_at, value: @artist.dissolved_at.present? ? @artist.dissolved_at.strftime('%d.%m.%Y') : nil %>
|
7
|
+
<%= show_attribute :listeners %>
|
8
|
+
<%= show_attribute :plays %>
|
9
|
+
</dl>
|
10
|
+
|
11
|
+
<div class="tabs">
|
12
|
+
<ul>
|
13
|
+
<li><a href="#releases"><%= t('music_releases.index.short_title') %></a></li>
|
14
|
+
<li>
|
15
|
+
<a href="<%= music_artist_videos_path(@artist.id) %>">
|
16
|
+
<%= t('music_videos.index.short_title') %>
|
17
|
+
<%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
18
|
+
</a>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
<div id="releases">
|
22
|
+
<%= render partial: 'music_metadata_enrichment/releases/collection', locals: { paginate: false } %>
|
23
|
+
</div>
|
24
|
+
</div>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<h3><%= t('music_metadata_enrichment_group_artist_connections.import.title') %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(@group, url: import_music_group_artists_path, method: :get, html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= f.input :artist_connections_text, as: :text %>
|
5
|
+
<%= f.submit %>
|
6
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/artist_confirmation_form', locals: { title: t('music_metadata_enrichment_group_artist_connections.name_confirmation.title'), form_url: select_artist_music_group_artists_path, form_method: :get } %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/new_artist_form', locals: { title: t('music_metadata_enrichment_group_artist_connections.new.title'), form_url: name_confirmation_music_group_artists_path } %>
|
File without changes
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<h3><%= t('music_metadata_enrichment_groups.new.title') %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(@group, url: music_groups_path, method: :post, html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @group } %>
|
5
|
+
<%= f.input :name %>
|
6
|
+
<%= f.submit %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% content_for :javascript_includes do %>
|
2
|
+
<%= javascript_include_tag 'voluntary_music_metadata_enrichment/groups/show' %>
|
3
|
+
<% end %>
|
4
|
+
<% content_for :top_javascript do %>
|
5
|
+
var group_id = "<%= params[:id] %>";
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<h3><%= @group.name %></h3>
|
9
|
+
|
10
|
+
<div class="tabs">
|
11
|
+
<ul>
|
12
|
+
<li>
|
13
|
+
<a href="#releases"><%= t('music_releases.index.short_title') %></a>
|
14
|
+
</li>
|
15
|
+
<li>
|
16
|
+
<a href="<%= music_group_videos_path(@group.id) %>">
|
17
|
+
<%= t('music_videos.index.short_title') %>
|
18
|
+
<%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
19
|
+
</a>
|
20
|
+
</li>
|
21
|
+
<li>
|
22
|
+
<a href="<%= artists_music_group_path(@group.id) %>">
|
23
|
+
<%= t('music_artists.index.short_title') %>
|
24
|
+
<%= image_tag 'voluntary/spinner.gif', class: 'ajax_spinner hide' %>
|
25
|
+
</a>
|
26
|
+
</li>
|
27
|
+
</ul>
|
28
|
+
<div id="releases">
|
29
|
+
<%= render partial: 'music_metadata_enrichment/releases/collection', locals: { paginate: false, with_artist: true } %>
|
30
|
+
</div>
|
31
|
+
</div>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<% with_artist ||= false %>
|
2
|
+
<% paginate ||= false %>
|
3
|
+
<% if @group.present? || params[:user_id].present? %>
|
4
|
+
<form class="simple_form form-horizontal">
|
5
|
+
<div class="control-group string required year">
|
6
|
+
<label for="year" class="string required control-label"><%= t('music_releases.index.year') %></label>
|
7
|
+
<div class="controls">
|
8
|
+
<%= select_tag 'year', options_for_select([['Next', Time.now.strftime('%Y').to_i + 1], ['Current', Time.now.strftime('%Y')], ['Past', Time.now.strftime('%Y').to_i - 1]], @year) %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</form>
|
12
|
+
<% end %>
|
13
|
+
<% if @releases.none? %>
|
14
|
+
<p><%= I18n.t("music_releases.index.empty_collection")%></p>
|
15
|
+
<% else %>
|
16
|
+
<table class="table table-striped">
|
17
|
+
<thead>
|
18
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
19
|
+
<th><%= t("activerecord.attributes.music_release.released_at") %></th>
|
20
|
+
<% if with_artist %>
|
21
|
+
<th><%= t("music_artists.model.short_name") %></th>
|
22
|
+
<% end %>
|
23
|
+
<th><%= t("attributes.name") %></th>
|
24
|
+
<th><%= t("attributes.listeners") %></th>
|
25
|
+
<th><%= t("attributes.plays") %></th>
|
26
|
+
</tr>
|
27
|
+
</thead>
|
28
|
+
<tbody>
|
29
|
+
<% @releases.each do |release| %>
|
30
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
31
|
+
<td><%= release.formatted_released_at_or_future_release_date %></td>
|
32
|
+
<% if with_artist %>
|
33
|
+
<td><%= link_to release.artist_name, music_artist_path(release.artist_id) %></td>
|
34
|
+
<% end %>
|
35
|
+
<td><%= link_to release.name, music_release_path(release.id) %></td>
|
36
|
+
<td><%= release.listeners %></td>
|
37
|
+
<td><%= release.plays %></td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<%= will_paginate @releases if paginate %>
|
45
|
+
|
46
|
+
<% if (request.original_url.match('/groups/') || ['groups', 'group_release_connections'].include?(controller_name)) && params[:id] %>
|
47
|
+
<%= link_to t('music_releases.index.add'), new_music_group_release_path(params[:id]) %> |
|
48
|
+
<%= link_to t('general.export'), releases_export_music_group_path(params[:id]), class: 'remote_modal_link' %>
|
49
|
+
<% elsif controller_name == 'artists' && params[:id].present? %>
|
50
|
+
<%= link_to t('music_releases.index.add'), new_music_artist_release_path(params[:id]) %>
|
51
|
+
<% else %>
|
52
|
+
<%= link_to t('music_releases.index.add'), new_music_release_path %>
|
53
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h3><%= t('music_releases.announce.title') %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(@release, url: create_announcement_music_releases_path, method: :post, html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @release } %>
|
5
|
+
<%= hidden_field_tag :group_id, params[:group_id] if params[:group_id].present? %>
|
6
|
+
<%= f.hidden_field :artist_id %>
|
7
|
+
<%= f.hidden_field :name %>
|
8
|
+
<%= f.input :future_release_date, hint: I18n.t('music_releases.announce.future_release_date_format') %>
|
9
|
+
<%= f.submit %>
|
10
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/artist_confirmation_form', locals: { title: t('music_releases.artist_confirmation.title'), form_url: select_artist_music_releases_path, form_method: :get } %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h3><%= t('music_releases.by_name.title') %></h3>
|
2
|
+
|
3
|
+
<% if @releases.none? %>
|
4
|
+
<p><%= I18n.t("music_releases.name_confirmation.empty_collection")%></p>
|
5
|
+
<% else %>
|
6
|
+
<table class="table table-striped">
|
7
|
+
<thead>
|
8
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
9
|
+
<th><%= t("activerecord.models.music_artist") %></th>
|
10
|
+
<th><%= t("attributes.name") %></th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<% @releases.each do |release| %>
|
15
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
16
|
+
<td><%= link_to release.artist_name, music_artist_path(release.artist_id) %></td>
|
17
|
+
<td><%= link_to release.name, music_release_path(release.id) %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= will_paginate @releases %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="modal-header">
|
2
|
+
<button type="button" id="close_bootstrap_modal_button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
3
|
+
<h3><%= t('music_metadata_enrichment_groups.show.export', year: params[:year])%></h3>
|
4
|
+
</div>
|
5
|
+
<div class="modal-body" style="overflow-y:none;">
|
6
|
+
<textarea rows="20" style="width:515px;">
|
7
|
+
<% @current_releases.each do |release| %>
|
8
|
+
<%= release.formatted_released_at_or_future_release_date %>. [artist]<%= release.artist_name %>[/artist] - [album artist=<%= release.artist_name %>]<%= release.name %>[/album]
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% @future_releases.each do |release| %>
|
12
|
+
<%= release.formatted_released_at_or_future_release_date %>. [artist]<%= release.artist_name %>[/artist] - [album artist=<%= release.artist_name %>]<%= release.name %>[/album]
|
13
|
+
<% end %>
|
14
|
+
</textarea>
|
15
|
+
</div>
|
16
|
+
<div class="modal-footer">
|
17
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% content_for :search do %>
|
2
|
+
<%= form_tag by_name_music_releases_path, method: :get, class: 'form-search' do %>
|
3
|
+
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
4
|
+
<%= text_field_tag 'artist_name', params[:artist_name], class: 'input-small search-query', placeholder: t('music_releases.index.artist_search_placeholder') %>
|
5
|
+
<%= text_field_tag 'name', params[:name], class: 'input-small search-query', placeholder: t('music_releases.index.name_search_placeholder') %>
|
6
|
+
<button type="submit" class="btn"><%= t('general.search') %></button>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<h3><%= t('music_releases.name.title') %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(@release, url: name_confirmation_music_releases_path, method: :get, html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @release } %>
|
5
|
+
<%= hidden_field_tag :group_id, params[:group_id] if params[:group_id].present? %>
|
6
|
+
<%= f.hidden_field :artist_id %>
|
7
|
+
<%= f.input :name %>
|
8
|
+
<%= f.submit t('music_releases.name.submit') %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h3><%= t('music_releases.name_confirmation.title') %></h3>
|
2
|
+
|
3
|
+
<% if @release_groups.none? %>
|
4
|
+
<p><%= I18n.t("music_releases.name_confirmation.release_found_but_does_not_satisfy_criteria")%></p>
|
5
|
+
<% else %>
|
6
|
+
<%= form_tag music_releases_path, method: :post do %>
|
7
|
+
<%= hidden_field_tag :group_id, params[:group_id] if params[:group_id].present? %>
|
8
|
+
<%= hidden_field_tag 'music_release[artist_id]', @release.artist_id %>
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
12
|
+
<th/>
|
13
|
+
<th><%= t("attributes.name") %></th>
|
14
|
+
<th><%= t("activerecord.attributes.music_releases.type") %></th>
|
15
|
+
<th><%= t("activerecord.attributes.music_releases.secondary_types") %></th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% @release_groups.each do |release_group| %>
|
20
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
21
|
+
<td><%= radio_button_tag 'music_release[name_and_mbid]', "#{release_group[:title]};#{release_group[:mbid]}" %></td>
|
22
|
+
<td><%= release_group[:title] %></td>
|
23
|
+
<td><%= release_group[:type] %></td>
|
24
|
+
<td><%= (release_group[:secondary_types] || []).join(', ') %></td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
<p>
|
30
|
+
<%= submit_tag t('music_releases.name_confirmation.confirm') %>
|
31
|
+
</p>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'music_metadata_enrichment/shared/new_artist_form', locals: { title: t('music_releases.new.title'), form_url: artist_confirmation_music_releases_path } %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<h3><%= @release.artist_name %> - <%= @release.name %></h3>
|
2
|
+
|
3
|
+
<dl class="dl-horizontal">
|
4
|
+
<%= show_attribute :mbid, value: link_to(@release.mbid, "http://musicbrainz.org/release/#{@release.mbid}") if @release.mbid.present? %>
|
5
|
+
<%= show_attribute :artist_id, value: link_to(@release.artist_name, music_artist_path(@release.artist_id)) %>
|
6
|
+
<%= show_attribute :released_at, value: @release.formatted_released_at_or_future_release_date %>
|
7
|
+
<%= show_attribute :listeners %>
|
8
|
+
<%= show_attribute :plays %>
|
9
|
+
</dl>
|
10
|
+
|
11
|
+
<h4><%= t('music_tracks.index.short_title') %></h4>
|
12
|
+
|
13
|
+
<% if @tracks.none? %>
|
14
|
+
<p><%= I18n.t("music_tracks.index.empty_collection")%></p>
|
15
|
+
<% else %>
|
16
|
+
<table class="table table-striped">
|
17
|
+
<thead>
|
18
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
19
|
+
<% unless @release.name == '[Bonus Tracks]' %>
|
20
|
+
<th><%= t("attributes.nr") %></th>
|
21
|
+
<% end %>
|
22
|
+
<th><%= t("attributes.name") %></th>
|
23
|
+
<th></th>
|
24
|
+
<th><%= t("activerecord.attributes.music_track.duration") %></th>
|
25
|
+
<% if @release.name == '[Bonus Tracks]' %>
|
26
|
+
<th><%= t("activerecord.attributes.music_track.released_at") %></th>
|
27
|
+
<% end %>
|
28
|
+
<th><%= t("attributes.listeners") %></th>
|
29
|
+
<th><%= t("attributes.plays") %></th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody>
|
33
|
+
<% @tracks.each do |track| %>
|
34
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
35
|
+
<% unless @release.name == '[Bonus Tracks]' %>
|
36
|
+
<td><%= track.nr %></td>
|
37
|
+
<% end %>
|
38
|
+
<td><%= link_to track.name, music_track_path(track.id) %></td>
|
39
|
+
<td><%= render partial: 'music_metadata_enrichment/tracks/spotify_track_player', locals: { spotify_track_id: track.spotify_track_id } %></td>
|
40
|
+
<td><%= track.formatted_duration %></td>
|
41
|
+
<% if @release.name == '[Bonus Tracks]' %>
|
42
|
+
<td><%= track.released_at.strftime('%d.%m.%Y') if track.released_at.present? %>
|
43
|
+
<% end %>
|
44
|
+
<td><%= track.listeners %></td>
|
45
|
+
<td><%= track.plays %></td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
<% end %>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<h3><%= title %></h3>
|
2
|
+
|
3
|
+
<% if @artists.none? %>
|
4
|
+
<p><%= I18n.t("music_artists.name_confirmation.empty_collection")%></p>
|
5
|
+
<% else %>
|
6
|
+
<%= form_tag form_url, method: form_method do %>
|
7
|
+
<%= hidden_field_tag :group_id, params[:group_id] if params[:group_id].present? %>
|
8
|
+
<%= hidden_field_tag :user_id, params[:user_id] if params[:user_id].present? %>
|
9
|
+
<table class="table table-striped">
|
10
|
+
<thead>
|
11
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
12
|
+
<th/>
|
13
|
+
<th><%= t("attributes.name") %></th>
|
14
|
+
<th><%= t("activerecord.attributes.music_artists.disambiguation") %></th>
|
15
|
+
<th><%= t("activerecord.attributes.music_artists.type") %></th>
|
16
|
+
<th><%= t("activerecord.attributes.music_artists.gender") %></th>
|
17
|
+
<th><%= t("activerecord.attributes.music_artists.founded_at") %></th>
|
18
|
+
<th><%= t("activerecord.attributes.music_artists.dissolved_at") %></th>
|
19
|
+
<th><%= t("attributes.tags") %></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<% @artists.each do |artist| %>
|
24
|
+
<tr class="<%= cycle('odd', 'even') %>">
|
25
|
+
<td><%= radio_button_tag 'music_artist[name_and_mbid]', "#{artist[:name]};#{artist[:mbid]}" %></td>
|
26
|
+
<td><%= artist[:name] %></td>
|
27
|
+
<td><%= artist[:disambiguation] %></td>
|
28
|
+
<td><%= artist[:type] %></td>
|
29
|
+
<td><%= artist[:gender] %></td>
|
30
|
+
<td><%= artist[:begin] %></td>
|
31
|
+
<td><%= artist[:end] %></td>
|
32
|
+
<td><%= (artist[:tags] || []).map{|t| t[:name]}.join(', ')%>
|
33
|
+
</tr>
|
34
|
+
<% end %>
|
35
|
+
</tbody>
|
36
|
+
</table>
|
37
|
+
<p>
|
38
|
+
<%= submit_tag 'Confirm' %>
|
39
|
+
</p>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h3><%= title %></h3>
|
2
|
+
|
3
|
+
<%= simple_form_for(@artist, url: form_url, method: :get, html: {class: 'form-horizontal'}) do |f| %>
|
4
|
+
<%= hidden_field_tag :group_id, params[:group_id] if params[:group_id].present? %>
|
5
|
+
<%= hidden_field_tag :user_id, params[:user_id] if params[:user_id].present? %>
|
6
|
+
<%= render partial: 'shared/form/error_messages', locals: { resource: @artist } %>
|
7
|
+
<%= f.input :name %>
|
8
|
+
<%= f.input :mbid %>
|
9
|
+
<%= f.submit t('music_artists.new.submit') %>
|
10
|
+
<% end %>
|