diff --git a/app/assets/stylesheets/components/forms.scss b/app/assets/stylesheets/components/forms.scss
index 7eb1c5fe3..df4bd487b 100644
--- a/app/assets/stylesheets/components/forms.scss
+++ b/app/assets/stylesheets/components/forms.scss
@@ -150,6 +150,13 @@
&::-ms-clear {
display: none;
}
+
+ &.disabled {
+ background-color: #f2f2f2;
+ color: #888888;
+ pointer-events: none;
+ cursor: not-allowed;
+ }
}
///////////////////////////////////////////////////
diff --git a/app/assets/stylesheets/views/dashboard.scss b/app/assets/stylesheets/views/dashboard.scss
index a2cf615b6..f846effe8 100644
--- a/app/assets/stylesheets/views/dashboard.scss
+++ b/app/assets/stylesheets/views/dashboard.scss
@@ -46,3 +46,18 @@
line-height: var(--lh-tight);
}
}
+
+.disabled-info-container {
+ display: flex;
+ flex-direction: row;
+}
+
+.disabled-info-icon {
+ color: #666666;
+ margin-right: 10px;
+}
+
+.disabled-info-text {
+ color: #666666;
+ text-align: left;
+}
diff --git a/app/views/dashboards/_dashboard_article_row.html.erb b/app/views/dashboards/_dashboard_article_row.html.erb
index 23cd3fceb..29f777921 100644
--- a/app/views/dashboards/_dashboard_article_row.html.erb
+++ b/app/views/dashboards/_dashboard_article_row.html.erb
@@ -122,22 +122,30 @@
- <%= f.select :user_id, options_for_select(organization.users.pluck(:name, :id), article.user_id), {}, { class: "crayons-select" } %>
+ <%= f.select :user_id, options_for_select(organization.users.pluck(:name, :id), article.user_id), {}, { class: "crayons-select #{article_series ? 'disabled': ''}", disabled: article_series } %>
<%= f.hidden_field :from_dashboard, value: 1 %>
+ <% if article_series %>
+
+ <%= crayons_icon_tag("info", class: "disabled-info-icon", title: t("views.dashboard.article.icon")) %>
+
<%= t("views.dashboard.article.series_author_change_warning") %>
+
+ <% end %>
-
-
-
- <%= f.text_field :co_author_ids_list,
- id: "article_#{article.id}_co_author_ids_list",
- class: "article_org_co_author_ids_list",
- data: {
- fetch_users: organization_members_path(organization.username, format: "json")
- } %>
+ <% unless article_series %>
+
+
+
+ <%= f.text_field :co_author_ids_list,
+ id: "article_#{article.id}_co_author_ids_list",
+ class: "article_org_co_author_ids_list",
+ data: {
+ fetch_users: organization_members_path(organization.username, format: "json")
+ } %>
+
+ <%= f.hidden_field :from_dashboard, value: 1 %>
- <%= f.hidden_field :from_dashboard, value: 1 %>
-
+ <% end %>
<% end %>
diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb
index 801ee7561..743ee3ffc 100644
--- a/app/views/dashboards/show.html.erb
+++ b/app/views/dashboards/show.html.erb
@@ -40,7 +40,7 @@
<% @articles.each do |article| %>
<% if params[:which] == "organization" %>
- <%= render "dashboard_article_row", article: article, organization: article.organization, org_admin: true, manage_view: false %>
+ <%= render "dashboard_article_row", article: article, organization: article.organization, org_admin: true, manage_view: false, article_series: article.collection.present? %>
<% else %>
<%= render "dashboard_article_row", article: article, organization: nil, org_admin: false, manage_view: false %>
<% end %>
diff --git a/config/locales/views/dashboard/en.yml b/config/locales/views/dashboard/en.yml
index 3af1f097a..62166ae5f 100644
--- a/config/locales/views/dashboard/en.yml
+++ b/config/locales/views/dashboard/en.yml
@@ -96,6 +96,8 @@ en:
unarchive: Unarchive post
author: Author
co_authors: Co-authors
+ series_author_change_warning: No author changes allowed for series posts.
+ icon: Details
author_is: 'AUTHOR: '
save: Save
submit: Submit author change
diff --git a/config/locales/views/dashboard/fr.yml b/config/locales/views/dashboard/fr.yml
index 6eb92f1ff..597e49433 100644
--- a/config/locales/views/dashboard/fr.yml
+++ b/config/locales/views/dashboard/fr.yml
@@ -95,6 +95,8 @@ fr:
unarchive: Unarchive post
author: Author
co_authors: Co-authors
+ series_author_change_warning: No author changes allowed for series posts.
+ icon: Details
author_is: 'AUTHOR: '
save: Save
submit: Submit author change