shared status shouldn't be by study but by processed data
This issue was initially discussed in https://github.com/biocore/qiita/pull/850 but we realized that this will require bigger modifications to actually work well.

Description:
Let's imagine that a study has 2 raw datas (A/B) and 2 prep templates (1/2) in each one (for clarity, we will have A1, A2, B1, and B2). Then the users makes public the study because A1 was published, then all the other raw datas + prep templates will also be public, which is not OK. What we will need to have is that the user makes public a process data, then all the files that generated that "biom" become public. We will display public studies based on their public process data.

diff --git a/qiita_pet/handlers/study_handlers/description_handlers.py b/qiita_pet/handlers/study_handlers/description_handlers.py
index 1b845e64..10d8fb5f 100644
--- a/qiita_pet/handlers/study_handlers/description_handlers.py
+++ b/qiita_pet/handlers/study_handlers/description_handlers.py
@@ -613,6 +613,33 @@ class StudyDescriptionHandler(BaseHandler):
 
         callback((msg, msg_level, tab, tab_id, None))
 
+    def delete_prep_template(self, study, user, callback):
+        """Delete the selected prep template
+
+        Parameters
+        ----------
+        study : Study
+            The current study object
+        user : User
+            The current user object
+        callback : function
+            The callback function to call with the results once the processing
+            is done
+        """
+        prep_template_id = int(self.get_argument('prep_template_id'))
+        prep_id = PrepTemplate(prep_template_id).raw_data
+
+        try:
+            PrepTemplate.delete(prep_template_id)
+            msg = ("Prep template %d has been deleted" % prep_template_id)
+            msg_level = "success"
+            prep_id = None
+        except Exception as e:
+            msg = ("Couldn't remove prep template: %s" % str(e))
+            msg_level = "danger"
+
+        callback((msg, msg_level, 'raw_data_tab', prep_id, None))
+
     @authenticated
     def get(self, study_id):
         study, user = self._get_sudy_and_check_access(study_id)
@@ -640,7 +667,8 @@ class StudyDescriptionHandler(BaseHandler):
             request_approval=self.request_approval,
             make_sandbox=self.make_sandbox,
             update_investigation_type=self.update_investigation_type,
-            delete_raw_data=self.delete_raw_data)
+            delete_raw_data=self.delete_raw_data,
+            delete_prep_template=self.delete_prep_template)
 
         # Get the action that we need to perform
         action = self.get_argument("action", None)
diff --git a/qiita_pet/templates/study_description.html b/qiita_pet/templates/study_description.html
index 25ba7620..33860ef5 100644
--- a/qiita_pet/templates/study_description.html
+++ b/qiita_pet/templates/study_description.html
@@ -152,7 +152,6 @@ function add_prep_template(raw_data_id) {
   }
 }
 
-
 function delete_raw_data(raw_data_filetype, raw_data_id) {
   if (confirm('Are you sure you want to delete raw data: ' + raw_data_filetype + ' (ID: ' + raw_data_id + ')?')) {
     var form = $("<form>")
@@ -171,6 +170,26 @@ function delete_raw_data(raw_data_filetype, raw_data_id) {
   }
 }
 
+function delete_prep_template(data_type, prep_template_id) {
+  if (confirm('Are you sure you want to delete prep template: ' + data_type + ' (ID: ' + prep_template_id + ')?')) {
+    var form = $("<form>")
+    .attr("action", window.location.href)
+    .attr("method", "post")
+    .append($("<input>")
+    .attr("type", "hidden")
+    .attr("name", "prep_template_id")
+    .attr("value", prep_template_id))
+    .append($("<input>")
+    .attr("type", "hidden")
+    .attr("name", "action")
+    .attr("value", "delete_prep_template"));
+    $("body").append(form);
+    form.submit();
+  } else {
+    return false;
+  }
+}
+
 function make_public() {
   if (confirm("Are you sure you want to make this study public?")) {
     var form = $("<form>")
diff --git a/qiita_pet/templates/study_description_templates/prep_template_panel.html b/qiita_pet/templates/study_description_templates/prep_template_panel.html
index c96bcc3c..b12d65b4 100644
--- a/qiita_pet/templates/study_description_templates/prep_template_panel.html
+++ b/qiita_pet/templates/study_description_templates/prep_template_panel.html
@@ -41,7 +41,8 @@
 <div class="panel panel-default">
   <div class="panel-heading">
     <h4 class="panel-title">
-      <a data-toggle="collapse" data-parent="#prep-accordion" href="#collapse{{prep_id}}">{{data_type}} (ID: {{prep_id}})</a>
+      <a data-parent="#prep-accordion" href="#collapse{{prep_id}}" style="pointer-events: none; cursor: default;">{{data_type}} (ID: {{prep_id}})</a>
+        <button class="close" title="Remove this prep template" type="button" onclick="delete_prep_template('{{data_type}}', {{prep_id}})">&nbsp; ×</button>
     </h4>
   </div>
   <div id="collapse{{prep_id}}" class="panel-collapse collapse in">
['qiita_pet/templates/study_description_templates/prep_template_panel.html', 'qiita_pet/templates/study_description.html', 'qiita_pet/handlers/study_handlers/description_handlers.py']